0
我有問題試圖讓我的回收看房子我的整個文本,當我填充它們裏面,但它似乎專注於使用手機的屏幕高度,因此一些我的文本丟失了。我怎麼能把它們全部放在一起。Recyclerview不能容納我所有的內容,但只限於屏幕高度
佈局再循環器保持器的視圖代碼
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp"
android:layout_margin="6dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="8dp"
android:orientation="vertical">
<TextView
android:id="@+id/txtDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat"
tools:text="D"
android:textSize="16sp"
android:textStyle="normal|bold" />
</linear.......................
RecyclerBox佈局是像這些
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
android:focusableInTouchMode="true"
android:focusable="true">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycleNView">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
從'LinearLayout'中移除'RecyclerView'。 –
將RecyclerView高度更改爲「match_parent」 –
感謝@Rachana,工作完美。 – Cistem