Android系统。搜索在LISTVIEW [英] Android. Searching over the listView

查看:198
本文介绍了Android系统。搜索在LISTVIEW的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有ListView的活动。这ListView的包含的ImageView和两个textViews(又名姓和名)。我想组织(按姓氏例如)通过的TextView之一,这个搜索的ListView。
我怎样才能实现呢?

I have activity with ListView. That listView contains imageView and two textViews (aka first and last names). I want to organize searching with this listView by one of textView (e.g. by last name). How can I implement that?

我发现,快速搜索框可以使用,但我不知道如何使用它。

I found that Quick Search Box can be used but I didn't understand how to work with it.

帮助,PLZ:)

推荐答案

您可以使用 setTextFilterEnabled(布尔)方法。

如果它不能解决你的问题,那么你也可以定义自己的过滤器。

If it does not solve your problem then you can also define your own filter.

有关此,请看到这个帖子<一个href=\"http://stackoverflow.com/questions/2208225/android-how-do-i-overwrite-the-filter-for-my-arrayadapter/2606896#2606896\">android-how-do-i-overwrite-the-filter-for-my-arrayadapter

For this please see this post android-how-do-i-overwrite-the-filter-for-my-arrayadapter

希望这有助于!

这篇关于Android系统。搜索在LISTVIEW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆