【问题标题】:How to change the default keyboard next arrow into custom name in keyboard?如何将默认键盘下一个箭头更改为键盘中的自定义名称?
【发布时间】:2013-05-20 15:49:34
【问题描述】:

在我的应用程序登录屏幕中,我需要更改默认键盘的最后一个下一个箭头,而不是像下一个这样的一些文本,这样做对于 android 是否可行?如果有人知道你能回答这个问题。

【问题讨论】:

  • 在你提问之前先搜索一下,已经有很多问题了stackoverflow.com/questions/14100482/…
  • 我已经尝试过那个,但是直到我无法得到下一个而不是键盘上的那个箭头
  • 您在哪个设备上测试?我在摩托罗拉 atrix 等摩托罗拉设备上遇到了同样的问题
  • 现在我得到了解决方案,我在使用滑动键盘之前更改了手机默认 android 键盘中的输入类型,但问题没有改变,现在我得到了输出,感谢您的回复

标签: android android-keypad


【解决方案1】:

你可以使用EditTextandroid:imeActionLabel="YourText"android:imeOptions="actionNext"属性

下面是示例代码

           <EditText
                android:id="@+id/edit_user"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:hint="@string/userprofile_email"
                android:inputType="textEmailAddress"
                android:imeActionLabel="@string/next"
                android:imeOptions="actionNext"
                 />

【讨论】:

  • 箭头没有改变还有没有其他方法可以帮助我尝试这 3 个小时我无法将该箭头更改为下一个文本
  • 可能我们无法更改图标,但请尝试任何其他 imeOptions instaed of "actionNext" 并检查
【解决方案2】:

在您的 EditText 视图中使用 android:imeOptions="actionGo" 然后单击此 edittext 视图键盘将出现 Go 按钮

   <RelativeLayout
        android:id="@+id/relative"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/header"
        android:background="@drawable/rounded_corner_bg" >

        <EditText
            android:id="@+id/userName"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:layout_marginLeft="20dp"
            android:background="@android:color/transparent"
            android:ems="10"
            android:hint="@string/Username"
            android:inputType="textEmailAddress" >

            <requestFocus />
        </EditText>

        <View
            android:id="@+id/lineView"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_below="@+id/userName"
            android:background="@color/lineColor" />

        <EditText
            android:id="@+id/password"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:layout_alignLeft="@+id/userName"
            android:layout_below="@+id/lineView"
            android:background="@android:color/transparent"
            android:ems="10"
            android:hint="@string/Password"
            android:imeOptions="actionGo"
            android:inputType="textPassword"
            android:singleLine="true" />
    </RelativeLayout>

【讨论】:

  • 我试试这个键盘没有出现 Go 按钮你知道还有其他选择吗
猜你喜欢
  • 2017-04-09
  • 2016-02-03
  • 2019-05-26
  • 2018-07-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-09-16
  • 1970-01-01
相关资源
最近更新 更多