且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android:使用在 AutoCompleteTextView 中选择的项目来填充另一个字段

更新时间:2022-04-18 07:02:27

您可以为包含所有信息的 AutoCompleteTextView 创建自定义适配器,假设您有一个 People(姓名、部门、​​职位)类.

You can create a custom Adapter for your AutoCompleteTextView which has all the info, say you have a class People(name, department, designation).

类似的东西

autoCompleteTextView.setAdapter(new CustomAdapter<People>(getBaseContext(),  android.R.layout.simple_list_item_1, "a list of all your people"))