【问题标题】:android:imeOptions="actionNext" does not work without specifying android:inputTypeandroid:imeOptions="actionNext" 不指定 android:inputType 不起作用
【发布时间】:2023-04-05 19:59:01
【问题描述】:

代码:

<AutoCompleteTextView
                android:id="@+id/txtUsername"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:completionThreshold="1"
                android:hint="@string/prompt_uname"
                android:inputType="text"
                android:imeOptions="actionNext"
                android:maxLines="1"
                android:popupBackground="#aaaaaa"
                android:textSize="@dimen/login_page_text_size" />

在上面的代码中当我没有指定 android:inputType="text" "Next Button" 没有出现在键盘上 安卓操作系统:4.0.1

【问题讨论】:

    标签: android autocomplete textview


    【解决方案1】:

    单行已弃用,因此需要输入类型添加下面的代码。

             android:inputType="text"
            android:maxLines="1"
            android:imeOptions="actionNext"
    

    【讨论】:

      【解决方案2】:

      您说的是 android:imeOptions 而不是 android:imeActionLabel (正如其名称所示)是一个标签,这将是在按钮上写的内容...

      【讨论】:

        【解决方案3】:

        使用 imeActionLabel 代替 imeOptions 如下..

        android:inputType="text"

        android:imeActionLabel="下一个"

        【讨论】:

        • @Entretoize android:inputType="text" AND android:imeActionLabel="Next" 这两行作为标签的操作。 NEXT-关注下一个视图,DONE 关闭键盘。
        猜你喜欢
        • 2012-09-03
        • 2019-11-28
        • 2019-07-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-07-30
        • 1970-01-01
        • 2015-02-23
        相关资源
        最近更新 更多