Preface
This chapter is about android. widget. filterQueryProvider, version: Android 3.0 r1, translated from "xiaoQLu", with sample code, welcome to its blog: "http://www.cnblogs.com/xiaoQLu", thanks again "xiaoQLu "! I look forward to your participation in Android API translation, contact me over140@gmail.com.
Statement
You are welcome to repost, but please keep the original source of the article :)
Blog Garden: http://www.cnblogs.com/
Android Chinese translation group: http://goo.gl/6vJQl
Body
I. Structure
Public interface FilterQueryProvider
Android. widget. FilterQueryProvider
Ii. Overview
This class can be used by CursorAdapter and CursorTreeAdapter to define how to filter the adapter content.
See
runQuery(CharSequence)
Iii. Public Methods
Public abstract CursorRunQuery(CharSequence constraint)
Execute the filter query with the specified constraints. This query requires that the results be appended to the adapter through the filter. Convention: When the constraint condition is null or null, the original results before filtering must be returned. (Note: You can use Like and other statements to execute SQL queries in this method)
Parameters
Query constraints that must be filtered by constraint
Return Value
Cursor representing the new query result)
Iv. Supplement
Article Selection
The CursorAdapter and CursorFilter mechanisms of Android
How CursorAdapter implements keyword Filtering