android 输入法挤出布局

2014-12-26 18:37:58 +08:00
 Registering
我的activity取出掉了title,

头部自己写的一个linearlayout做title


然后中间是一个listview

底部是一个edittext


点击edittext,弹出输入法,title和listview,edittext都被挤上上去了,



我想要的是控制title不会被挤上去,listview和edittext可以被挤上去。


上网找了方法,但是经常是布局不动,输入法覆盖了edittext
2805 次点击
所在节点    程序员
3 条回复
jamev5
2014-12-26 19:27:40 +08:00
根布局设置为RelativeLayout 然后EditText设置 alignParentBottom=true , ListView above EditText。ListView below title。这样呢。
darktiny
2014-12-26 19:35:40 +08:00
android:windowSoftInputMode="stateUnspecified|adjustResize"
Registering
2014-12-27 13:02:09 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/156958

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX