-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
How can one get support fragment manager from ThemedReactContext ? #21194
Comments
We are automatically closing this issue because it does not appear to follow any of the provided issue templates. Please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library. If you'd like to propose a change or discuss a feature request, there is a repository dedicated to Discussions and Proposals you may use for this purpose. |
For people on Google that end up here, you can make your activities extends |
@augustl ReactFragmentActivity is marked as deprecated and will be removed soon, you shouldn't be using it. |
As far as I can tell, there's no other way of doing it in 0.56 that I can see, so I thought I'd just mention it here in case anyone else found this issue on Google :) |
Any hints for RN 0.60+? |
I'm writing a custom native android library that exposes a support fragment for display. I created a simple view manager on the android side of react in which I return a placeholder layout in
createViewInstance
and later intend to add the library fragment insidereceiveCommand
on user action from the react side. However in order to add the fragment to the aforementioned container I cannot get the support fragment manager from the ThemedReactContext obj that I capture increateViewInstance
. DoingfooThemedReactContext.getCurrentActivity()
yields the deprecatedandroid.app.FragmentManager
. How do I getandroid.support.v4.app.FragmentManager
instead in my view manager?The text was updated successfully, but these errors were encountered: