android - How to show drop down list below EditText? -


i have edittext , 1 button search, want show list of search result below edittext when click on button,

enter image description here

when enter text "abc" , click on search button drop down should open below edittext.

need suggestion or sample demo or code.

edit: should open drop down seems in autocompletetextview

use autocompletetextview, set high treshold "settreshold()" , call showdropdown() on button click

code update:

string[] values = {     "abc_0", "def_0", "ghi_0",     "abc_1", "def_1", "ghi_1",     "abc_2", "def_2", "ghi_2",     "abc_3", "def_3", "ghi_3", };  final autocompletetextview actv = (autocompletetextview) findviewbyid(r.id.actv); final arrayadapter<string> adapter = new arrayadapter<string>(this,     android.r.layout.simple_dropdown_item_1line, values); actv.setadapter(adapter); actv.setthreshold(256); // if not enough set integer.max_value findviewbyid(r.id.button).setonclicklistener(new onclicklistener() {     @override     public void onclick(view v) {         charsequence constraint = actv.gettext();         adapter.getfilter().filter(constraint);         actv.showdropdown();     } }); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -