要显示Android的文本字段中最后使用的值 [英] Want to show last used values in Android text field

查看:99
本文介绍了要显示Android的文本字段中最后使用的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来显示最后一次输入的数值为一个EditText字段中的值?我目前能最后输入的值保存到我的数据库和pre-填充上次使用的值进入该领域本身,但我想表明它被点击时,场下的值列表。

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.

推荐答案

您可以在最后输入的值保存到一个持续性的数据存储(如您使用的数据库..或者共享preferences)。

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

使用一个微调,而不是EditText上 http://developer.android。 COM /资源/教程/视图/ HELLO-spinner.html

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

这篇关于要显示Android的文本字段中最后使用的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆