0

我正在使用 MultiAutoCompleteTextView ,我想在 MultiAutoCompleteTextView 中附加选定的文本,我正在尝试

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");
            automulti.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());


            Log.d("ad:", automulti.getText().toString());
            automulti.append(", " + name  );




        }
4

2 回答 2

0

试试这个代码,

MultiAutoCompleteTextView myEditText = (MultiAutoCompleteTextView)findViewById(R.id.mymulti);
     String stringEditText = MultiAutoCompleteTextView.getText().toString();
于 2013-08-28T10:15:53.057 回答
0

尝试这个。

 MultiAutoCompleteTextView myEditText = (MultiAutoCompleteTextView)findViewById(R.id.mymulti);
   String stringEditText = myEditText.getText().toString();
于 2015-05-26T06:03:41.177 回答