Search Functionality for Listview

前端 未结 3 1527
无人及你
无人及你 2020-12-06 08:18

i\'m new to android. I\'m just trying to make one simple search functionality for my app. My app consists one ListView one EditText and one B

3条回答
  •  萌比男神i
    2020-12-06 08:45

    you may use Auto completer with your Editext and using that update your List Adapter and Also see

    .addTextChangedListener(new TextWatcher() {
    
                @Override
                public void onTextChanged(CharSequence s, int start, int before, int count) {
                
                }
    
                @Override
                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
                    // TODO Auto-generated method stub
    
                }
    
                @Override
                public void afterTextChanged(Editable s) {
                    // TODO Auto-generated method stub
    
                }
            });
    

提交回复
热议问题