【问题标题】:kotlin android Only decimal keyboardkotlin android 只有十进制键盘
【发布时间】:2020-07-02 06:40:50
【问题描述】:

我只想得到这样的十进制键盘:

但我明白了:

这就是我的工作

<EditText
            android:imeOptions="actionDone"
            android:inputType="phone"
            android:digits="0123456789,."
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/funding_amount"
            android:layout_marginTop="8dp"
            android:background="@drawable/bt_state_blue_light"
            android:hint="@string/pln_amount_placeholder"
            android:minHeight="40sp"
            android:padding="5dp"
            android:textColor="@color/background_tutorial"
            android:textColorHint="@color/text_color_tutorial"
            android:textSize="@dimen/text_dp_16" />

如果我改变我会得到这个:

android:digits="0123456789" android:inputType="numberDecimal"

【问题讨论】:

  • 何时使用android:digits="0123456789" android:inputType="numberDecimal" 然后@,# 启用与否?
  • @IntelliJAmiya 它不起作用
  • 它的谷歌键盘或任何自定义键盘?
  • it not work 表示@,# 已启用?
  • @IntelliJAmiya 未启用,但我看到了这个按钮

标签: android


【解决方案1】:

您需要创建一个可以输入数字小数的android自定义键盘。检查此链接以制作您自己的自定义键盘How can you make a custom keyboard in Android? 或使用库,如here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-05-15
    • 2012-12-11
    • 2014-10-10
    • 1970-01-01
    • 1970-01-01
    • 2016-01-23
    • 2020-06-05
    相关资源
    最近更新 更多