【问题标题】:Where is "go" button in EditTextEditText 中的“开始”按钮在哪里
【发布时间】:2011-07-06 19:15:03
【问题描述】:

我有一个 editText,它显示一个换行按钮而不是一个 go 按钮。为什么?

android:minLines="40"

另外,我正在使用以下方式显示虚拟键盘:

InputMethodManager imm = (InputMethodManager) TrackActivity.this.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null){
  imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
}

【问题讨论】:

    标签: android android-layout android-edittext


    【解决方案1】:

    如果你想要一个“Go”按钮,试试这个作为你的edittext元素:

    换句话说,将 imeOptions 设置为“actionGo”。

    【讨论】:

      【解决方案2】:

      您必须指定所需的操作键盘类型。对于您的特定情况,您需要指定您需要一个“开始”按钮。

      http://developer.android.com/reference/android/widge/TextView.html#attr_android:imeActionLabel

      android:imeActionLabel="actionGo"

      【讨论】:

        【解决方案3】:
        android:imeOptions="actionGo"
        

        简单

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2021-04-05
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多