There is an xml markup. In RecyclerView, I load data from api (list of products) the problem is that after the data is loaded, then the button "Next>" disappears somewhere. I can not understand where the error and what is the problem

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/search_edit_text" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="4.25" /> <Spinner android:id="@+id/category_spinner" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" /> <Button android:id="@+id/submit_button" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Submit" /> </LinearLayout> <android.support.v7.widget.RecyclerView android:id="@+id/recycler_conteiner" android:layout_width="match_parent" android:layout_height="wrap_content" /> <Button android:id="@+id/next_page" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Next >" /> </LinearLayout> 

    1 answer 1

    The button you do not fit on the screen. Set the height for the RecyclerView so that it takes up all the space between the upper and lower buttons. For example, in terms of weight:

     <android.support.v7.widget.RecyclerView android:id="@+id/recycler_conteiner" android:layout_width="match_parent" android:layout_weight="1" android:layout_height="0dp" />