zoukankan      html  css  js  c++  java
  • Android API之android.content.AsyncQueryHandler

    android.content.AsyncQueryHandler

    A helper class to help make handling asynchronous ContentResolver queries easier.

     

    void android.content.AsyncQueryHandler.startQuery(int token, Object cookie, Uri uri, String[] projection, String selection, String[] selectionArgs, String orderBy)

    This method begins an asynchronous query. When the query is done onQueryComplete is called.

    Parameters:
    token A token passed into onQueryComplete to identify the query.
    cookie An object that gets passed into onQueryComplete
    uri The URI, using the content:// scheme, for the content to retrieve.
    projection A list of which columns to return. Passing null will return all columns, which is discouraged to prevent reading data from storage that isn't going to be used.
    selection A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given URI.
    selectionArgs You may include ?s in selection, which will be replaced by the values from selectionArgs, in the order that they appear in the selection. The values will be bound as Strings.
    orderBy How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered.

     

    protected void onQueryComplete(int token, Object cookie, Cursor cursor)

    Overrides: onQueryComplete(...) in AsyncQueryHandler

    Parameters:
    token the token to identify the query, passed in from startQuery.
    cookie the cookie object passed in from startQuery.
    cursor The cursor holding the results from the query.
  • 相关阅读:
    第十六周学习进度报告
    个人课程总结
    第一阶段意见评论
    用户评价
    第二阶段10
    第二阶段9
    第二阶段8
    第十五周学习进度报告
    第二阶段7
    第二阶段6
  • 原文地址:https://www.cnblogs.com/fengzhblog/p/3181233.html
Copyright © 2011-2022 走看看