How to expand React Native views hierarchy inside native (Android) view?

I am trying to replace React Native ViewPagerAndroid with RecyclerView plus custom LayoutManager. Below is an image of what I'm trying to achieve, red and blue squares below the text to better describe the problem.

Desired layout

The image below is what I get instead.

Invalid layout

The text view continues from the input window (vertical white window), and the layout of the blue square also leaves the last. Using LayoutInspector, I see that the width of the text field and right edge of the blue rectangle equal width of the screen, even if I call the methods measureand layoutin representations React Native.

Below is a screenshot of the view hierarchy.

Annotated View Hierarchy

React Native ( ) ?

+4

Source: https://habr.com/ru/post/1687827/


All Articles