So you have finally decided to use
AutoCompleteTextView[
^]
To answer this question, see the following sample code, this is an extension from my answer to your earlier question:
1. From the activity that contains the AutoCompleteTextView to pick up the found item and navigate to a new activity say "NewActivity.java":
AutoCompleteTextView autoCompleteTextView = (AutoCompleteTextView)
findViewById(R.id.autoCompleteTextView);
ArrayAdapter adapter = ArrayAdapter.createFromResource(this,
R.array.zodiac, android.R.layout.select_dialog_item);
autoCompleteTextView.setThreshold(1);
autoCompleteTextView.setAdapter(adapter);
autoCompleteTextView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
String foundItem = arg0.getItemAtPosition(arg2).toString();
Log.i("You have selected --->", foundItem );
Intent newIntent = new Intent(getApplicationContext(), NewActivity.class);
newIntent.putExtra("foundItem", foundItem );
startActivity(newIntent);
}
});
2. In the "NewActivity.java":
Intent intent = getIntent;
Bundle bundle = intent.getExtras();
String foundItem = bundle.getString("foundItem ");
Last but not least, you should acknowledge the solutions (past and present) that help.