Limiting the number of search suggestions, android -
Is there any way to limit the number of suggestions displayed while using the search interface with custom search suggestions?
Thank you!
This is really very simple.
Firstly define a variable for your Define something to keep your boundary value in your then Then you can use it with content provider for reference:
public static final string LIMIT_PARAMETER = "LIMIT";
cursor query @ override
string border = Yuri. (LIMIT_PARAMETER);
border to
SqliteQueryBuilder :
pass the last cursor cursor = queryBuilder.query ( Db, projection, selection, selection order, blank, empty, sort order, border);
contentResolver :
getContentResolver (). Query (SOME_CONTENT_URI.buildUpon () .appendQueryParameter (YourContentProvider.LIMIT_PARAMETER, yourLimit) .build (), mSuggestionProjection, mSelection, FilterArgArray, ORDER_BY);
Comments
Post a Comment