Just noticed that android:password has been deprecated, and we should be using android:inputType. Was experimenting with it by setting in my xml
android:inputType="textPassword"
Indeed it behaves like
android:password="true"
for EditText, but it seems that if I use android:inputType, android:hint will not work. The EditText will be blank. There is no such issues when using android:password with android:hint. Am I missing something here about android:inputType?
Hint is displayed correctly with
and
if you set also
Actually, I found that if you put the the android:gravity="center" at the end of your xml line, the hint text shows up fine with the android:inputType="textVisiblePassword"
Here is your answer:
There are different category for
inputType
so I used for pssword istextPaswword