Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6909251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:39:57+00:00 2026-05-27T08:39:57+00:00

I have a ListView and an EditText . I implement addTextChangedListener on EditText to

  • 0

I have a ListView and an EditText. I implement addTextChangedListener on EditText to filter the ListView content.

leftList.setTextFilterEnabled(true);
et_search.addTextChangedListener(filterTextWatcher);

and then the TextWatcher is:

private TextWatcher filterTextWatcher = new TextWatcher() {

    public void afterTextChanged(Editable s) {
    }

    public void beforeTextChanged(CharSequence s, int start, int count,
            int after) {
    }

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

         if (watcherAdapter==null) {
             return;
         }

         watcherAdapter.getFilter().filter(s);

         Log.e(TAG, "OnTextChange: " + s + " start: " + start +
         " before: " + before + " count: " + count + " adapter: " +
         watcherAdapter.getCount());    

    }
};

Condition:

  1. I have 10 items in ListView.

Question:

  1. When I first type the first character, why the watcherAdapter.getCount() returns 10 (as initial) in ListView instead of the returned filter result count? The watcherAdapter.getCount() seems a-click late for the displayed result in ListView.
  2. How I achieve to show "No Result" in ListView when there is no match results as I type on the EditText?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:39:58+00:00Added an answer on May 27, 2026 at 8:39 am

    The only solution I use at last is to do my custom search filter….Split the words, tokenizes them, and if matched put it on array as adapter to the List. And it works as I want it

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView and a EditText . How can I filter ListView data
I have a ListView that I filter with and EditText that I have a
I have an Activity in Android, with two elements: EditText ListView When my Activity
Hallo all, I have a ListView, which contains an EditText in each of it's
I have different elements in my layout: Buttons, RadioButtons, EditText, a ListView and I
I have a ListView subclass that display rows that each contain an EditText and
I have a custom listView with a textView, editText and a Button on a
I have a layout with a ListView that contains EditText objects that can requestFocus()
i have listview and editText ,i need to scroll the last item of the
I have a ListView and a EditText. I want to be search the name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.