【发布时间】:2014-10-29 03:13:48
【问题描述】:
我在 HorizontalScrollView 中有三个列表视图。我想让它们中的每一个都占据整个屏幕,方法是将它们包含在一个设置为(layout_width:match_parent,layout_height:match_parent)的线性布局中。但是,它不起作用。正如您从屏幕截图中看到的那样,三个列表视图彼此紧密相连。
有什么建议可以让三个列表视图分别占据全屏吗?非常感谢。
<HorizontalScrollView
android:id="@+id/horizontalScrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/page_bg_color">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/tab_login_myFriends_requestList"
android:background="#ffffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/tab_login_myFriends_pendingList"
android:background="#ffffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/tab_login_myFriends_confirmedList"
android:background="#ffffffff" />
</LinearLayout>
</LinearLayout>
</HorizontalScrollView>
【问题讨论】:
-
占据整个屏幕是什么意思?你有 3 个列表视图?你想要一个类似的东西吗?等比例?
标签: android listview horizontalscrollview