我在一個滾動視圖中添加了兩個列表視圖,因爲我的兩個listview都包含數據,但是我面臨的問題是,當我在滾動視圖中添加listview(S) ,它只顯示每個列表視圖中的一個項目。如何在滾動視圖中添加兩個listview
這裏是圖像,
的XML代碼:
<ScrollView
android:id="@+id/scrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/layoutFooter7"
android:layout_below="@+id/linArrange" >
<RelativeLayout
android:id="@+id/linListViews"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ListView
android:id="@+id/lstviewUnBlockVenues"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
android:divider="#00000000"
android:dividerHeight="0dp"
android:fadeScrollbars="false" >
</ListView>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lstviewUnBlockVenues"
android:background="#ABCDEF"
android:orientation="vertical" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Blocked Venues"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#061218" />
</LinearLayout>
<ListView
android:id="@+id/lstviewBlockedVenues"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout1"
android:cacheColorHint="#00000000"
android:divider="#00000000"
android:dividerHeight="0dp"
android:fadeScrollbars="false" >
</ListView>
</RelativeLayout>
</ScrollView>
所有我想要的是滾動視圖應該向下滾動,如果列表視圖中含有較多的項目,截至此時這兩個列表視圖僅顯示一個項目:(
ListView控件中顯示正確的數據,其中的問題? – noob 2012-03-06 16:32:37