【问题标题】:Display smiley button at right bottom on Android keyboard在 Android 键盘的右下角显示笑脸按钮
【发布时间】:2016-10-16 11:52:26
【问题描述】:

当用户在我的 EditText 中输入时,我需要默认显示笑脸按钮。

现在我的 EditText 的键盘看起来像:

看看右下角,你会看到完成按钮。

同时在短信应用键盘看起来像:

[

右下角显示微笑按钮。

如何在键盘上为我的 EditText 显示微笑按钮?

现在我有了下一个 ExitText 布局:

<EditText
  ... // some layout params             
  android:inputType="textCapSentences|textAutoCorrect|textAutoComplete"/>

【问题讨论】:

    标签: android android-edittext android-input-method


    【解决方案1】:

    您可以尝试在EditText 中添加以下属性。您的代码中缺少的属性是textShortMessage。因此,您可以尝试添加相同的内容。

        android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
        android:imeOptions="actionSend|flagNoEnterAction"
    

    【讨论】:

    • 它有效。谢谢。看起来很奇怪,但我在一小时内无法在 Internet 上找到解决方案。
    【解决方案2】:

    您只需添加 imeOption textShortMessage

    <EditText
      ... // some layout params             
      android:inputType="textShortMessage|textCapSentences|textAutoCorrect|textAutoComplete"/>
    

    【讨论】:

      猜你喜欢
      • 2013-08-25
      • 1970-01-01
      • 2016-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多