在我的活動頁面中,有一個佈局,其中包含頂部(listview1),列表視圖1下方的一個列表視圖,此視圖下方有一個textrview,第二個列表視圖放置。我想滾動完整的佈局。如何滾動包含2個列表視圖和android中的文本視圖的佈局
下面是示例代碼
<ScrollView
android:id="@+id/scrol1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/linearLayout1"
android:layout_marginTop="15dp" android:scrollbars="vertical" android:isScrollContainer="true">
<RelativeLayout
android:id="@+id/relativeLayout4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/linearLayout1"
android:layout_marginTop="15dp" >
<ListView
android:id="@+id/lstMore"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:divider="@null"
android:fadingEdge="none"
android:footerDividersEnabled="false" android:dividerHeight="0dp" android:cacheColorHint="#00000000">
</ListView>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Learn More"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black"
android:textStyle="bold" android:layout_below="@id/lstMore"/>
<ListView
android:id="@+id/lstMoreBottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fadingEdge="none" android:layout_below="@id/textView2" android:divider="@null" android:dividerHeight="0dp" android:cacheColorHint="#00000000">
</ListView>
</RelativeLayout>
</ScrollView>
如果你給更多的信息會更容易兩種回答選項。你的代碼做什麼,會發生什麼,你看到什麼,等等...... – 2012-01-12 09:14:01
通過放置上面的代碼,主滾動視圖不顯示。列表視圖1,列表視圖2滾動的都不起作用。 – 2012-01-12 09:18:44