如何使用 GridView
来创建下面这个视图。
列表中的项目数量是动态的。
如何使用 GridView
来创建下面这个视图。
列表中的项目数量是动态的。
我猜这不是单独的GridView,而是多个布局的组合。只需创建一个LinearLayout,根据内容决定在一行中想要哪种布局。
GridView
的能力来解决这个问题。 - mparazListView
,因为我的View
需要包含高度不同的图片。
看起来我需要开发自己的定制控件。 - mparaz要获得您所看到的布局,您可以使用类似以下的代码:
<LinearLayout android:orientation="vertical">
<!-- First row -->
<View />
<!-- Second row -->
<LinearLayout android:orientation="horizontal" />
<!-- Third row -->
<LinearLayout android:orientation="horizontal" />
<!-- Fourth row -->
<View />
</LinearLayout>
http://android-developers.blogspot.it/2011/08/horizontal-view-swiping-with-viewpager.html