Android的:如何使键盘始终可见? [英] Android: How to make the keypad always visible?

查看:211
本文介绍了Android的:如何使键盘始终可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android上,我们如何使设备键盘始终显示在应用程序?顶部显示应用程序要呈现的内容和底部部分显示小键盘总是

In android, how do we make the device keypad always visible in the application? The top portion displays the content the application wants to render and bottom portion displays the keypad always.

推荐答案

添加机器人:windowSoftInputMode =stateAlwaysVisible你在AndroidManifest.xml文件活动:

Add android:windowSoftInputMode="stateAlwaysVisible" to your activity in the AndroidManifest.xml file:

<activity android:name=".MainActivity"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysVisible" />

在我的测试应用程序这显示了应用程序的启动键盘,虽然它不是固定在那里,但可以通过pressing后退按钮被解雇。

In my test app this shows the keyboard on starting of the application although it isn't fixed there but can be dismissed by pressing the back button.

要确保键盘永远是你可能需要创建自己的键盘为您的应用程序的一部分可见。可能使用Android键盘的Andr​​oid源:<一href="http://android.git.kernel.org/?p=platform/packages/inputmethods/LatinIME.git;a=tree">http://android.git.kernel.org/?p=platform/packages/inputmethods/LatinIME.git;a=tree

To make sure the keyboard is always visible you might have to create your own keyboard as part of your application. Possibly using the Android keyboard from the Android source: http://android.git.kernel.org/?p=platform/packages/inputmethods/LatinIME.git;a=tree

另外还有一个目前的讨论在这里,但没有一个完整的解决方案: <一href="http://groups.google.com/group/android-developers/browse_thread/thread/17210d784766602d">http://groups.google.com/group/android-developers/browse_thread/thread/17210d784766602d

Alternatively there is a current discussion here but without a complete solution: http://groups.google.com/group/android-developers/browse_thread/thread/17210d784766602d

这篇关于Android的:如何使键盘始终可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆