Reputation: 3215
I have one quesiton with me.
I am trying to find the answer but no success.
1-I have one editpasswordfield
in which i can give only numeric password.
i did like this
<EditText
android:id="@+id/editText4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="numberPassword"/>
and its showing the keyboard number with text.
but i need the keyboard like this
i tried this
android:inputType="numberPassword|number"
and many possibilities but does not worked for me .
if i try android:inputType="number"
.It works but my field is password so this does not work its visible to user.
any help.
Upvotes: 1
Views: 772
Reputation: 5472
Try this..
EditText editText = (EditText) findViewById(R.id.editText4);
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
Hope this helps....
Upvotes: 2