如何在屏幕底部设置TextView

我有这样的布局:

把ListView放在ScrollView里面有点棘手,但它起作用了。 当列表很大,并滚动时出现滚动..一切,包括形式。 那没问题!

现在我想将TextView固定在屏幕的底部。 总共

试图用RelativeLayout在ScrollView中放置layout_weight =“1”。 工作。 但是当键盘出现时,沿着TextView上升并且不需要它。

如何在屏幕底部设置TextView,而在键盘出现时不移动?


将所有内容放在相对的布局中。 将TextView添加到相对布局,在TextView上设置layout_alignParentBottom。 然后在ScrollView中设置layout_above引用TextView。


遵循设计层次结构:

<LinearLayout.....>

<ScrollView>

<You Old Views/>

</ScrollView

<TextView> .. </TextView>


</LinearLayout>
链接地址: http://www.djcxy.com/p/93221.html

上一篇: How to set a TextView at the bottom of the screen

下一篇: Which layout should I select?