Android EditText for password with android:hint

前端 未结 9 1127
清歌不尽
清歌不尽 2020-12-13 03:21

Just noticed that android:password has been deprecated, and we should be using android:inputType. Was experimenting with it by setting in my xml

         


        
9条回答
  •  一个人的身影
    2020-12-13 04:19

    Just stumbled on the answer. android:inputType="textPassword" does work with android:hint, same as android:password. The only difference is when I use android:gravity="center", the hint will not show if I'm using android:inputType. Case closed!

提交回复
热议问题