¡@

Home 

2014/10/16 ¤W¤È 08:23:35

android Programming Glossary: searchableinfo

Turn AutoCompleteTextView into a SearchView in ActionBar instead

http://stackoverflow.com/questions/11491515/turn-autocompletetextview-into-a-searchview-in-actionbar-instead

import org.json.JSONObject import android.app.Activity import android.app.SearchManager import android.app.SearchableInfo import android.content.Context import android.content.Intent import android.content.SharedPreferences import android.content.SharedPreferences.OnSharedPreferenceChangeListener.. SearchManager searchManager SearchManager getSystemService Context.SEARCH_SERVICE if searchManager null List SearchableInfo searchables searchManager.getSearchablesInGlobalSearch Try to use the applications global search provider SearchableInfo.. searchables searchManager.getSearchablesInGlobalSearch Try to use the applications global search provider SearchableInfo info searchManager.getSearchableInfo getComponentName for SearchableInfo inf searchables if inf.getSuggestAuthority null..

Android search with Fragments

http://stackoverflow.com/questions/7230893/android-search-with-fragments

is not possible as it would require changes to the underlying system itself . Check out the source code for the SearchableInfo class if you don't believe me . That being said it doesn't seem like it would be too difficult to achieve something similar..

Android ActionbarSherlock SearchView

http://stackoverflow.com/questions/8971776/android-actionbarsherlock-searchview

4.2.0 in dev branch and has SearchView backported there. It has limited functionality most notable no support for SearchableInfo . But he is working on expanding functionality. I didn't know about Jake Wharton's intentions on backporting SearchView.. SearchView and did my version of backport can be found on github abs search view . My version also does not support SearchableInfo . These two implementations were done in mostly the same way. They use much of the same code taken from AOSP. But there..