How to create a top numeric bar on the Android keyboard

4

Does anyone know how to create in the XML of an EditText that numeric bar on the keyboard?

    
asked by anonymous 02.01.2017 / 12:33

3 answers

3

This bar appears when you arrow the inputType as textPassword, however this will depend on the Android keyboard. If you want to use an editText with visible text, you can use a textVisiblePassword.

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/editText"
    android:hint="Search"
    android:inputType="textPassword" />

or

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/editText"
    android:hint="Search"
    android:inputType="textVisiblePassword" />
    
02.01.2017 / 14:11
1

You can set up a inputType for your EditText :

<EditText
    ...
    android:inputType="textPassword|number" ... />
    
02.01.2017 / 14:20
0

One option is to use one custom keyboard and add to your project . As far as I know, you will not be able to do this with the standard Android keyboard, as there are no options in android:inputType that satisfy what you need.

    
02.01.2017 / 13:38