先生、autocompletext の連絡先を android.contact の listview の連絡先に一致させるにはどうすればよいですか。連絡先は phone.pls からすべて選択してください。
String products[]= { contactsList.};
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
contactsList = (ListView) view.findViewById(R.id.contactsList);
contactsList.setOnItemClickListener(this);
contactsList.setTextFilterEnabled(true);
inputSearch=(AutoCompleteTextView) view.findViewById(R.id.inputSearch);
contactsList.setAdapter(new ArrayAdapter<String>(getActivity(),
android.R.layout.simple_list_item_1,products ));
inputSearch.setThreshold(1);
inputSearch.setAdapter(adapter);
inputSearch.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}
});
inputSearch.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
Map<String, String> map = (Map<String, String>)arg0.getItemAtPosition(arg2);
String name = map.get("Name");
String number = map.get("Phone");
inputSearch.setText(""+name+"<"+number+">");
}
}) ;`
return view;