import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
public class AutoCom extends Activity {
/** Called when the activity is first created. */
AutoCompleteTextView au;
String s[]={"Krishna reddy","Dheeraj giroti","Rahul sonone","Anupama","Chanu"};
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
au=(AutoCompleteTextView)findViewById(R.id.autoCompleteTextView1);
ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,s);
au.setAdapter(adapter);
au.setThreshold(1);
}
}
No comments:
Post a Comment