AutoCompleteTextView获取值

AutoCompleteTextView actv = (AutoCompleteTextView) findViewById(R.id.Auto1);
        ArrayAdapter<String> aa = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line,
          RECIPESADD);
        actv.setAdapter(aa);
        Button b = (Button) findViewById(R.id.Button02);
        b.setOnClickListener(this);
    }
    public void onClick(View v) {
    String metext = actv.getText().toString();
     TextView mTextView03 = (TextView) findViewById(R.id.TextView03);
     mTextView03.setText(metext);
    }
}

你可能感兴趣的:(android)