Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

ContentPager.QueryRunner

public static interface ContentPager.QueryRunner

androidx.contentpager.content.ContentPager.QueryRunner


Implementations of this interface provide the mechanism for execution of queries off the UI thread.

Summary

Nested classes

interface ContentPager.QueryRunner.Callback

Callback that receives a cursor once a query as been executed on the Runner. 

Public methods

abstract void cancel(Query query)

Attempt to cancel a (presumably) running query.

abstract boolean isRunning(Query query)
abstract void query(Query query, ContentPager.QueryRunner.Callback callback)

Execute a query.

Public methods

cancel

public abstract void cancel (Query query)

Attempt to cancel a (presumably) running query.

Parameters
query Query: The query in question.

isRunning

public abstract boolean isRunning (Query query)

Parameters
query Query: The query in question.

Returns
boolean true if the query is already running.

query

public abstract void query (Query query, 
                ContentPager.QueryRunner.Callback callback)

Execute a query.

Parameters
query Query: The query that will be run. This value should be handed back to the callback when ready to run in the background.

callback ContentPager.QueryRunner.Callback: The callback that should be called to both execute the query (in the background) and to receive the results (in the foreground).