I want to show the 'only digits' keyboard when user taps on the editText
.
This can be achieved by
android:inputType="phone"
android:digits="0123456789"
I also want my editText
to hide the content. Which can be achieved by
android:inputType="numberPassword"
I tried to do both combined by doing:
android:inputType="phone"
android:digits="0123456789"
android:password="true"
This worked but android:password="true"
is deprecated. Is this possible to achieve in any other way?