简体   繁体   中英

Make Search View for Custom List View

I have a program which has a custom listview. I searched a lot on google and all the custom listview search has been done using EditText field and then use addTextChangedListener(). Is there any way that can use search View on my action bar to search my custom ListView? I populated my ListView by using a custom adapter from Base Adapter. Best example is WhatsApp application.

You can use the same strategy for a search View. Just register an OnTextChangedListener for the SearchView and use it to filter your ListView

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM