Skip to content Skip to sidebar Skip to footer

Keyboard With Numeric And Basic Math Operations For An EditText

How I can have this keyboard for an EditText? I tried with InputType but I could not have this keyboard. I have created this example that shows the answers are not solving the pro

Solution 1:

You can use this for displaying only numbers:

<EditText
        android:id="@+id/editTextNumber"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number" />

Or use this for displaying numbers when you use the EditText for Passwords:

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

Please also understand that mostly every phone has another keyboard design, so you may not get the exact keyboard you mentioned in you picture


Solution 2:

use this

<EditText
        android:id="@+id/editText3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number" />

Post a Comment for "Keyboard With Numeric And Basic Math Operations For An EditText"