Trying to write an adaptive native adapter for the Bottomheet Flipboard Component .
I can create an instance of the BottomSheetLayout just fine, but I'm having trouble adjusting its views.
Per API docs I'm trying to call setContentView with "the view that appears below the presented sheet, usually with the root view of your application", but I canβt get the correct view from the React class.
I tried to save the link to the ReactRootView created in MainActivity , but it rejected it using "The specified child already has a parent."
Is there any other root view that I miss React Native apps? How can I get a link to it from my adapter class?
My component manager class is simplified:
public class ReactBottomSheetManager extends ViewGroupManager<ReactBottomSheetLayout> { private View mRootView = null; private View mContentView = null; public static final int COMMAND_OPEN = 1; public ReactBottomSheetManager(View rootView) { super(); mRootView = rootView;
ReactBottomSheetLayout is a very simple class that inherits the Flipboard BottomSheetLayout .
Thanks!
source share