Android7.0中文文档(API)-- Filter

来源:互联网 发布:众思科技 知乎 编辑:程序博客网 时间:2024/06/06 20:09

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/Filter.html

Filter

public abstract class Filter
extends Object

java.lang.Object   ↳android.widget.Filter

A filter constrains data with a filtering pattern.
Filter使用过滤模板来约束数据。

Filters are usually created by Filterable classes.
Filter通常由Filterable类来创建。

Filtering operations performed by calling filter(CharSequence) orfilter(CharSequence, android.widget.Filter.FilterListener) are performed asynchronously. When these methods are called, a filtering request is posted in a request queue and processed later. Any call to one of these methods will cancel any previous non-executed filtering request.
过滤操作通过调用filter(CharSequence)filter(CharSequence, android.widget.Filter.FilterListener)来异步执行。当调用这些方法时,将在请求队列中发布一个过滤请求,并在稍后处理。任何对其中一个方法的调用都将取消先前未执行的过滤请求。

See also:
另请参考:

  • Filterable

摘要


嵌套类

interfaceFilter.FilterListener

Listener used to receive a notification upon completion of a filtering operation. 
在完成过滤操作后,用于接收通知的监听器。 

classFilter.FilterResults

Holds the results of a filtering operation. 
保存一个过滤操作的结束。 

Public构造方法

Filter()

Creates a new asynchronous filter.
创建一个新异步Filter。

Public方法

CharSequenceconvertResultToString(Object resultValue)

Converts a value from the filtered set into a CharSequence.
将一个值从过滤后的集转换成CharSequence。

final voidfilter(CharSequence constraint)

Starts an asynchronous filtering operation.
开始一个异步过滤操作。

原创粉丝点击