我有一個Recyclerview這是工作的罰款與Android版本23,但如果我對Android版本25那麼整個畫面由單個項目佔據運行相同的代碼。RecyclerView項目填滿整個屏幕
最初,列表看起來很好,其中項目高度是包裝內容。但是,當我滾動整個屏幕被單個項目佔用。
下面是含有RecyclerView我的佈局:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:scrollbars="vertical" />
</LinearLayout>
請發佈您的recyclerview項目xml。 –
在回收站查看您正在充氣的發佈項目佈局。那麼只有我們能夠更精確地幫助你。 –
爲您的充氣佈局高度設置wrap_content。 –