-
Notifications
You must be signed in to change notification settings - Fork 30
[Android] - support React Native in fragment #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
michalchudziak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! We can either work in this PR or merge that and address changes later 😃
android/src/main/java/com/callstack/reactnativebrownfield/ReactNativeFragment.kt
Show resolved
Hide resolved
android/src/main/java/com/callstack/reactnativebrownfield/ReactNativeFragment.kt
Outdated
Show resolved
Hide resolved
| companion object { | ||
| const val MODULE_NAME = "com.callstack.reactnativebrownfield.MODULE_NAME" | ||
|
|
||
| fun createReactActivityIntent(context: Context, moduleName: String): Intent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we gonna need initialProps as a 3rd argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I created issue for that - https://github.com/callstack-internal/react-native-brownfield/issues/1. It is related to activity and fragment, so this part could be done in another PR
| companion object { | ||
| const val MODULE_NAME = "com.callstack.reactnativebrownfield.MODULE_NAME" | ||
|
|
||
| fun createReactNativeFragment(moduleName: String): ReactNativeFragment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same thing, an initialProps would be nice.
example/native/android/app/src/main/java/com/callstack/nativeexample/MainActivity.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| public void startReactNativeFragment(View view) { | ||
| Intent intent = new Intent(this, ReactNativeFragmentActivity.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we supposed to use createReactNativeFragment here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but I wanted to make it clean and I moved all stuff related to fragment to it's own activity. WDYT?
|
I prefer to finish all related work in this PR |
No description provided.