我有以下问题:
我需要 18 个带有 TextView
的按钮在他们旁边还有一个TextView
在他们之间。当然,它们不适合显示器,所以我搜索了这个问题并找到了 ListView
但这对我不起作用,因为我需要 18 Buttons
和 TextViews
具有不同的 ID。
我希望你能帮助我。
最佳答案
使用 <ScrollView>
注意 <ScrollView>
只有一个直系 child
所以它必须像 :
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<!-- your contents are here -->
</LinearLayout>
</ScrollView>
关于android - 如何滚动内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17766105/