需要一个previous和下一步按钮键盘上方下一步、按钮、键盘、previous

由网友(乱世杀手)分享简介:我要显示虚拟键盘时用preV,下一步按钮键盘上方。 I want to show the virtual keyboard with Prev, Next Buttons above the keyboard. 当用户点击$ P $光伏按钮,光标应该移动到previous编辑文本输入框,点击下一步按钮应该去下一个编...

我要显示虚拟键盘时用preV,下一步按钮键盘上方。

I want to show the virtual keyboard with Prev, Next Buttons above the keyboard.

当用户点击$ P $光伏按钮,光标应该移动到previous编辑文本输入框,点击下一步按钮应该去下一个编辑文本字段在视图中。

When the user clicks prev button, cursor should move to the previous edit-text input field and clicking on next button should go to the next edit-text field in the view.

我想使用这些按钮在自己的活动。我怎样才能做到这一点?

I want to use those buttons in my own activity. How can I do this?

推荐答案

这可以实现通过添加机器人:windowSoftInputMode =adjustPan为活动 清单中的元素。例如,

This can be achieve by adding android:windowSoftInputMode="adjustPan" to activity element within the manifest. E.g.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.codename.android"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" 
        android:label="@string/app_name"
        android:theme="@style/MyTheme"
        >

        <activity android:name=".MainActivity"
                  android:label="@string/app_name"
                  android:windowSoftInputMode="adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="7" />
</manifest> 

这prevents从显示虚拟键盘时,调整的看法。

This prevents the view from resizing when the virtual keyboard is displayed.

阅读全文

相关推荐

最新文章