Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a pin number password keyboard in android?

I need a number keyboard on a PIN EditText. I tried using

android:inputType="number|textPassword"

This brings up the number keypad, but the characters are not password chars.

How to get a number keypad that shows password chars in EditText view?

The app runs on 2.2 and above.

like image 968
Ronnie Avatar asked Oct 15 '12 17:10

Ronnie


1 Answers

You should have a look here: Edittext set for password with phone number input? (android)

It states that android:password is deprecated, but is the only way because android:inputType="phone|textPassword" is ignored ...

<EditText
    android:id="@+id/EditText01"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:password="true"
    android:inputType="phone" 
/>
like image 132
Heskja Avatar answered Oct 05 '22 21:10

Heskja