开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜