Answer the question
In order to leave comments, you need to log in
Why is the fragment not rendering the layout?
There is a layout described below. Used in a fragment.
The problem is that he completely refuses to show the bottom part (the one after the recyclerView).
The same markup was originally in the activity, everything worked fine there - the reason for replacing the layer, you need to see this lower “bar” when scrolling the list, but transferring the fragment to the markup, it was as if it was not there.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/recyclefragment"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="#F0F0F0"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/subheader"
android:orientation="vertical"
android:clickable="false"
android:padding="16dp">
<TextView
android:paddingLeft="20dp"
android:clickable="false"
android:text="Очевидно длинный текст"
android:textColor="#9e9e9e"
android:textSize="14sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/rvWords"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_alignParentBottom="true"
android:background="#757575"
android:orientation="horizontal"
android:paddingBottom="16dp"
android:paddingLeft="64dp"
android:paddingRight="64dp">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center"
android:layout_marginLeft="25dp"
android:background="@android:color/transparent"
android:src="@drawable/filter"
android:text="button 1" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@android:color/transparent"
android:src="@drawable/sort"
android:text="button 2" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center"
android:layout_marginRight="25dp"
android:background="@android:color/transparent"
android:src="@drawable/suggest_term"
android:text="button 3" />
</FrameLayout>
</LinearLayout>
Answer the question
In order to leave comments, you need to log in
Horses mixed up, people!)
You're using a LinearLayout, but you want it to work like a RelativeLayout. In your markup, it is written that RecyclerView should occupy all the space on the screen: from the top panel to the very bottom, because of this, the bottom panel is not visible. Use a RelativeLayout as the root container and tell the RecyclerView to take up all the space from the top container to the bottom one (layout_below="top_panel_id" and layout_above="bottom_panel_id").
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question