android中垂直滚动视图中的水平列表视图
我需要像这样实现应用程序 我试过的是android中垂直滚动视图中的水平列表视图,android,horizontalscrollview,vertical-scrolling,horizontallist,Android,Horizontalscrollview,Vertical Scrolling,Horizontallist,我需要像这样实现应用程序 我试过的是 I think they should done through horizontalscrollview/horizontallistview. So i integrate horizontal listview through this sample, 我需要的是 我需要在垂直listview中集成水平listview 我应该知道他们是如何整合这个想法的 任何帮助都是值得的。谢谢你需要这样的帮助吗 <ScrollView>
I think they should done through horizontalscrollview/horizontallistview.
So i integrate horizontal listview through this sample,
我需要的是
- 我需要在垂直listview中集成水平listview
- 我应该知道他们是如何整合这个想法的
任何帮助都是值得的。谢谢你需要这样的帮助吗
<ScrollView>
<LinearLayout android:orientation="vertical">
<!-- First row -->
<HorizontalScrollView>
<LinearLayout android:orientation="horizontal">
<!-- Items of this row -->
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</ScrollView>
您需要设置适当的布局属性,并且可能希望向行添加标题。如果行数可变,则可以通过编程方式创建行。我迟到了,但您可以使用此功能 仍然是这样,但它应该是静态的。我需要动态的方式,然后怎么做?@帕尔潘迪你可以从额外的XML资源中膨胀行,将它们添加到外部
LinearLayout
,然后将项目添加到内部LinearLayout
。您还可以使用ListView
s而不是LinearLayout
s(水平ListView
s仍然是一个难题)并向其中添加项目。