需要一个previous和下一步按钮键盘上方 [英] Need a previous and next button above the keypad

查看:493
本文介绍了需要一个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.

这篇关于需要一个previous和下一步按钮键盘上方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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