开发者

Want to show last used values in Android text field

开发者 https://www.devze.com 2023-02-03 13:47 出处:网络
Is there a way to display the values that were last entered values into an EditText field?I currently开发者_运维百科 am able to save the last entered values to my database and pre-populate the last us

Is there a way to display the values that were last entered values into an EditText field? I currently开发者_运维百科 am able to save the last entered values to my database and pre-populate the last used value into the field itself but I would like to show the list of values underneath the field when it is clicked on.


Use an AutoCompleteTextView.


You could save the last entered values to a persistant data storage (like you use database.. or sharedpreferences).

Use a Spinner instead of EditText http://developer.android.com/resources/tutorials/views/hello-spinner.html

0

精彩评论

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