Featured post

Marshmallow Features Point by Point

Android Runtime (“ART”) Improved application performance and lower memory overhead for faster  multi-tasking. Battery Doze...

Tuesday 23 February 2016

AutoCompleteTextView Uses and Callback

autoTxt_PatientName = (AutoCompleteTextView) findViewById(R.id.documents_autotxt_Search_Patients_by);

autoTxt_PatientName = (AutoCompleteTextView) findViewById(R.id.documents_autotxt_Search_Patients_by);

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line, COUNTRIES);
autoTxt_PatientName.setAdapter(adapter);


autoTxt_PatientName.setOnItemClickListener(new AdapterView.OnItemClickListener() 
{
    @Override
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) 
   {
       // Call After click on Item
    }
});
autoTxt_PatientName.setOnFocusChangeListener(new View.OnFocusChangeListener() 
    {
    @Override
    public void onFocusChange(View view, boolean b) 
    {
         //call when focus change
    }
});

No comments:

Post a Comment