
<linearLayout> <relativeLayout> Some Image and Text as Title </relativeLayout> <relativeLayout> <linearLayout> <ListVIEw> My message List </ListVIEw> </linearLayout> <relativeLayout> Edit Box and Send button </relativeLayout> </relativeLayout></linearLayout>
我在显示时明确地将当前选择设置为列表的最后一项(最新).
如果未在底部的“编辑”框中输入文本,则屏幕如下所示:
top Title List Item 8 List Item 7 ... List Item 2 List Item 1 Bottom Edit Box and Send button
当我单击编辑框以输入我的消息时,屏幕如下所示:
top Title List Item 8 ... List Item 5 Bottom Edit Box and Send button Keyboard
我真正想要的是:
top Title List Item 4 ... List Item 1 Bottom Edit Box and Send button Keyboard
有谁可以帮助我吗?
解决方法 我找到了答案 here.基本上只是使用自定义类扩展ListVIEw,将onSizeChanged()方法覆盖为setSelection(getCount());
这似乎是最好的解决方案,看起来谷歌语音使用相同的策略(因为如果你在聊天列表的顶部,然后旋转屏幕,它会让你回到底部).
还要记住,在清单中活动的标签中存在androID:windowsoftinputMode =“adjustResize”而不是adjustPan.
总结以上是内存溢出为你收集整理的Android:Listview没有使用键盘全部内容,希望文章能够帮你解决Android:Listview没有使用键盘所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)