我在我的一个引用应用程序中使用RecyclerView和LinearLayout,如下所示。RecyclerView隐藏LinearLayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:background="@color/colorPrimary"
android:layout_alignParentBottom="true"
android:id="@+id/pageNavLayout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="40dp">
<RelativeLayout
android:layout_weight="1"
android:id="@+id/butPrev"
style="@style/SelectableItemBackground"
android:clickable="true"
android:layout_width="0dp"
android:layout_height="match_parent">
<ImageView
android:layout_centerInParent="true"
android:scaleType="fitCenter"
android:src="@drawable/ic_keyboard_arrow_left_white_24dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<View
android:background="#ffffff"
android:layout_width="1dp"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/textPageCount"
android:clickable="true"
style="@style/SelectableItemBackground"
android:padding="8dp"
android:textSize="16sp"
android:textColor="@android:color/white"
android:text="Page 1 0f 67"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<View
android:background="#ffffff"
android:layout_width="1dp"
android:layout_height="match_parent"/>
<RelativeLayout
android:layout_weight="1"
style="@style/SelectableItemBackground"
android:clickable="true"
android:id="@+id/butNext"
android:layout_width="0dp"
android:layout_height="match_parent">
<ImageView
android:layout_centerInParent="true"
android:src="@drawable/ic_keyboard_arrow_right_white_24dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:layout_above="@id/pageNavLayout"
android:id="@+id/listQuoteView"
android:layout_width="match_parent"
android:layout_height="match_parent"></android.support.v7.widget.RecyclerView>
</RelativeLayout>
现在,当我按下一个按钮和RecyclerView列表中的其他报价...它躲在我的LinearLayout了一段时间,当我把它的滚动,它显示它。我已将LinearLayout用于我的底部栏。我缺少的东西以及我应该做的事情总是显示最后一栏?
谢谢
请问你可以用p ost你正在使用的代码? XML并没有告诉我们很多,例如你的隐藏元素或调整大小。 –