Android的:如何使键盘始终可见?键盘、Android

由网友(凉菜包)分享简介:在Android上,我们如何使设备键盘始终显示在应用程序?顶部显示应用程序要呈现的内容和底部部分显示小键盘总是In android, how do we make the device keypad always visible in the application? The top portion displays...

在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源: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

另外还有一个目前的讨论在这里,但没有一个完整的解决方案: 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

阅读全文

相关推荐

最新文章