我使用从MySQL数据库填充的ListView,listview项的数量由数据库返回的行确定(记录更新时更改)。ListView FullScreen-Item Scroll Horizontal
- 我不想用碎片
- 每个ListView项具有可点击按钮(ListView的项目本身将无法点击,只对他们的按钮会)
我以为它会是一些简单的定义为ListView水平方向,但它并非如此:
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
</ListView>
你应该看看'RecyclerView'。这是组织列表项的新方法。另外,它很容易水平显示。看看http://stackoverflow.com/questions/28460300/how-to-build-a-horizontal-listview-with-recyclerview –