Android 键盘不会挤压布局,但会移动 EditText
我已经开发了一个 iPhone 应用程序,现在准备将其移植到 Android 上。几乎所有功能都有效,但我注意到的唯一一件事是,当我聚焦任何 Texbox 或 Textarea 时,键盘会打开并将整个页面移出屏幕。我知道放置 android:windowSoftInputMode="adjustPan"
可以解决问题,但随后又出现了另一个问题。
现在,当我聚焦任何文本元素时,键盘会打开,但视图大小会被挤压到将底部选项卡按钮移到键盘上方的高度(减去键盘高度),在我看来,这是非常糟糕的效果。虽然它现在不会将整个页面移出屏幕,但我可以使用此属性 android:windowSoftInputMode="..."
要求它在选项卡按钮上显示键盘(隐藏键盘下的选项卡按钮) )但如果文本元素被隐藏,只需移动视图?
I have developed an iPhone app and now going to port it to Android. Almost all features work but the only thing I noticed is when I focus any Texbox or Textarea, the keyboard is opened and moves the whole page off the screen. I got to know that putting android:windowSoftInputMode="adjustPan"
would solve the issue but then another issue came out.
Now when I focus any text element, the keyboard is opened but the view size is squeezed to the height (minus keyboard height) shifting bottom tab buttons above keyboard which is very bad effect in my opinion. Although it doesn't now move the whole page off the screen but can I use this property android:windowSoftInputMode="..."
to ask it to show keyboard over tab buttons (hiding tab buttons under keyboard) but just move the view if the text elements are being hidden?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论