我正在开发一个应用程序,通过Web服务器上的API执行搜索。我的搜索页面在portait模式下显示良好,但对于横向模式来说太大了,所以我决定通过在layout-land文件夹中自定义XML来简单地包含ScrollView中的所有UI元素。问题是,我的表单底部的按钮没有在横向ScrollView中显示。我不是在肖像中使用ScrollView所以也许这就是问题所在?布局XML是这样的:
<LinearLayout>
<ScrollView>
<LinearLayout>
<TableLayout>
<!-- stuff here is being shown (table with TextViews and EditTexts -->
</TableLayout>
<LinearLayout>
<!-- stuff here is not being shown (3 Buttons) -->
</LinearLayout>
</LinearLayout>
</ScrollView>
答案 0 :(得分:4)
您很可能忘记将android:orientation="vertical"
设置为LinearLayout
(ScrollView的直接子项)。