You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify CardSearchProvider to return a cursor with recent queries when a search is performed. I think this requires creating a new database table for recent queries and returning a cursor to that table's columns when there is no text to suggest with yet.
It also requires saving queries to that table whenever a search by name is performed from anywhere.
The name AutoCompleteTextView is already showing matching card names.
How do you want to also add recent queries? Maybe show like the last 2 queries and below the cards to autocomplete? Any idea about that?
The idea isn't to show the recent and autocomplete options at the same time. The string to match is in selectionArgs[0] and if that's two or fewer characters long, instead of returning the cursor from getCardsByNamePrefix() (or null) you'd return a cursor of recent search terms. That cursor just needs a column called KEY_NAME.
To populate that database, you need to save the name from where SearchViewFragment creates ResultListFragments and case Intent.ACTION_SEARCH in FamiliarActivity. I think those are the only locations searches are done from.
Modify
CardSearchProvider
to return a cursor with recent queries when a search is performed. I think this requires creating a new database table for recent queries and returning a cursor to that table's columns when there is no text to suggest with yet.It also requires saving queries to that table whenever a search by name is performed from anywhere.
Android documentation: https://developer.android.com/guide/topics/search/adding-recent-query-suggestions.html
The text was updated successfully, but these errors were encountered: