[android][native-components-android.md] fix render android Fragment with flexbox #4027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi
I was creating a library that using Android Fragment and read RN docs about it https://reactnative.dev/docs/native-components-android?android-language=java#integration-with-an-android-fragment-example
But when I opened app I faced issue that flexbox wasn't working and I could set only fixed width & height. And moreover, when I removed width/height with FastRefresh app crashed
Library here: https://github.com/kesha-antonov/react-native-trueconf-sdk
Before changes (based only on RN docs):
1.mp4
After changes (flexbox works & adding/removing width/height doesn't crash the app):
2.mp4
There's also example app: https://github.com/kesha-antonov/react-native-trueconf-sdk/tree/master/example
But you need to comment out these lines to boot it: https://github.com/kesha-antonov/react-native-trueconf-sdk/blob/master/android/build.gradle#L25-L27
And also comment out imports related to
com.trueconf
since access to those deps available only with credentials