Show all items in AutocompleteTextView without writing text

前端 未结 12 805
萌比男神i
萌比男神i 2020-12-29 01:05

I have a AutocompleteTextView and it works fine. When I write a word it shows the relevant result but I want to show all items without writing any word in AutocompleteTextVi

12条回答
  •  天命终不由人
    2020-12-29 01:49

    use this :

     text.setOnTouchListener(new View.OnTouchListener(){
    
    
                @Override
                public boolean onTouch(View arg0, MotionEvent arg1) {
                    // TODO Auto-generated method stub
                    text.showDropDown();
                    return false;
                }
                });
    

提交回复
热议问题