0

Hi I want to add A search widget to my Android app like Whatsapp where in user Clicks a Search button And User is presented The result... I have already implemented the search logic in my custom listview , Now I want to Separate my Search logic and Listview Logic ... Things I am missing is when no user is found show A screen saying no user and also implement the search button in ActionBar

Below is my code for search logic...

EditText editTxt = (EditText) findViewById(R.id.inputSearch);          

// <To Implement No results Found>

editTxt.addTextChangedListener(new TextWatcher() {

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {

            if (count < before) {
                // We're deleting char so we need to reset the adapter data
                bindingData.resetData();
            }

            bindingData.getFilter().filter(s.toString());

        }

        /*Auto Generated Methods */
        @Override
        public void beforeTextChanged(CharSequence s, int start, int count,
                int after) {

        }

        @Override
        public void afterTextChanged(Editable s) {
        }
    });
Rohit
  • 179
  • 3
  • 14
  • This should help you. http://stackoverflow.com/questions/6383943/implement-search-on-a-custom-listview?rq=1 – VikramV Jun 24 '13 at 12:10
  • I have implemented search ... i want to interface my search through search widget on actionBar – Rohit Jun 24 '13 at 17:43

0 Answers0