Android 键盘遮挡 EditText

发布于 2024-08-16 10:49:31 字数 72 浏览 10 评论 0原文

在我的应用程序中,当我单击 EditText 视图时,虚拟键盘会遮挡视图,因此我看不到我的编辑。我怎样才能以编程方式解决这个问题?

In my application, when I click on an EditText view, the virtual keyboard obscures the view, so I can't see my edits. How can I resolve this programatically?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

汐鸠 2024-08-23 10:49:31

我推荐这篇文章,其中涵盖从 UI 分层的角度来看,IME 和底层活动如何交互的各种模式。如果不了解有关您的应用程序的更多信息,就不可能说明您是否需要调整大小或“平移和扫描”模式。

I recommend this article that covers the various modes for how the IME and the underlying activity interact from a UI layering perspective. Without knowing more about your application, it is impossible to state whether you want resizing or "pan and scan" modes.

躲猫猫 2024-08-23 10:49:31

哦,这发生在我身上,但我解决了

    <activity
        ...............
        android:windowSoftInputMode="stateVisible|adjustPan">
    </activity>

Oh, It happens to me, But I solve it

    <activity
        ...............
        android:windowSoftInputMode="stateVisible|adjustPan">
    </activity>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文