android - how to prefill Edittext?
I have an app where I am storing开发者_如何学运维 the usernames. Once the user clicks on his username, it goes to the login screen. Can it be done that the username be already inputted in the login screen. , so that the user only has to enter his password? Any help would be appreciated. Thanks!
Use the setText()
function.
you can use following code in xml:
android:text="<your text here>"
or
android:hint="<your text here>"
but there is more difference between those to android:text
and android:hint
, first one sets the text and second one will display untill any text entered.
精彩评论