我有一個ListView不滾動完成。我插入了20個項目,但列表視圖正在滾動,直到項目15º。列表視圖不滾動完全android
我的佈局XML代碼在這裏:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:background="@color/sky" >
<TextView
android:id="@+id/tvQuote"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:gravity="center_vertical|center_horizontal"
android:scrollbars="none"
android:text="@string/QuoteTeste"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/white"
android:textSize="14pt" />
<Space
android:id="@+id/espaco"
android:layout_width="wrap_content"
android:layout_height="30dp" >
</Space>
<TextView
android:id="@+id/tvAutor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/tvQuote"
android:layout_below="@+id/tvQuote"
android:layout_marginTop="22dp"
android:text="(Carlos Drummond)"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/white" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ListView
android:id="@+id/checklistview"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
</ListView>
</RelativeLayout>
</LinearLayout>
下面的截圖:
爲什麼發生這種情況,我不明白。例如,如果我放6個項目,6º項目不顯示,我不能滾動列表視圖。遺漏了什麼?
我試過,但我的ListView消失,第一RelativeLayout的(藍色用的TextView)填滿所有的屏幕。這裏截圖[鏈接](http://hhide.me/KxB) – rochasdv
我改變了第二個相關佈局高度。你可能還想補充一些利潤 – Benoit
那麼你有沒有嘗試過這麼小的改變? – Benoit