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.

The image below is what I get instead.

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 measure
and layout
in representations React Native.
Below is a screenshot of the view hierarchy.

React Native ( ) ?