Android 如何在horizontalScrollView中设置ListView以填充屏幕?
我在horizontalScrollView中有三个列表视图。我希望通过将它们包含到设置为(布局\宽度:匹配\父级,布局\高度:匹配\父级)的线性布局中,使它们占据整个屏幕。但是,它不起作用。正如您从屏幕截图中看到的,这三个列表视图彼此紧密相连 有什么建议可以让三个列表视图占据整个屏幕?非常感谢Android 如何在horizontalScrollView中设置ListView以填充屏幕?,android,listview,horizontalscrollview,Android,Listview,Horizontalscrollview,我在horizontalScrollView中有三个列表视图。我希望通过将它们包含到设置为(布局\宽度:匹配\父级,布局\高度:匹配\父级)的线性布局中,使它们占据整个屏幕。但是,它不起作用。正如您从屏幕截图中看到的,这三个列表视图彼此紧密相连 有什么建议可以让三个列表视图占据整个屏幕?非常感谢 <HorizontalScrollView android:id="@+id/horizontalScrollView" android:layout_width="fill_pa
<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>
使用这个
设置为真。此外,您的ListView可能应该有一个与之关联的权重属性
但我真的搞不懂你想干什么。也许可以提供xml,我将进一步指导您
我想你要找的是这个
你说占据整个屏幕是什么意思?您有3个列表视图?你想要一个挨着另一个的吗?同等比例?@Derekyy看看我的答案是的,屏幕幻灯片正是我想要的。谢谢。现在读吧。