ContentResolver.QueryArgSortColumns Field

Definition

Specifies the list of columns (stored as a String[]) against which to sort results.

[Android.Runtime.Register("QUERY_ARG_SORT_COLUMNS", ApiSince=26)]
public const string QueryArgSortColumns;
[<Android.Runtime.Register("QUERY_ARG_SORT_COLUMNS", ApiSince=26)>]
val mutable QueryArgSortColumns : string

Field Value

Attributes

Remarks

Specifies the list of columns (stored as a String[]) against which to sort results. When first column values are identical, records are then sorted based on second column values, and so on.

Columns present in this list must also be included in the projection supplied to ContentResolver#query(Uri, String[], Bundle, CancellationSignal).

Apps targeting android.os.Build.VERSION_CODES#O or higher: <li>ContentProvider implementations: When preparing data in ContentProvider#query(Uri, String[], Bundle, CancellationSignal), if sort columns is reflected in the returned Cursor, it is strongly recommended that #QUERY_ARG_SORT_COLUMNS then be included in the array of honored arguments reflected in Cursor extras Bundle under #EXTRA_HONORED_ARGS. <li>When querying a provider, where no QUERY_ARG_SQL* otherwise exists in the arguments Bundle, the Content framework will attempt to synthesize an QUERY_ARG_SQL* argument using the corresponding QUERY_ARG_SORT* values.

Java documentation for android.content.ContentResolver.QUERY_ARG_SORT_COLUMNS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to