|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.app.Dialog
android.app.SearchDialog
public class SearchDialog
In-application-process implementation of Search Bar. This is still controlled by the SearchManager, but it runs in the current activity's process to keep things lighter weight.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface android.content.DialogInterface |
|---|
DialogInterface.OnCancelListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, DialogInterface.OnKeyListener, DialogInterface.OnMultiChoiceClickListener |
| Field Summary | |
|---|---|
(package private) static int |
DBG_JAM_THREADING
|
(package private) static String |
LOG_TAG
|
(package private) IntentFilter |
mCloseDialogsFilter
|
(package private) View.OnClickListener |
mGoButtonClickListener
React to a click in the GO button by launching a search. |
(package private) View.OnKeyListener |
mGoButtonKeyListener
React to typing in the GO button by refocusing to EditText. |
(package private) IntentFilter |
mPackageFilter
|
(package private) View.OnFocusChangeListener |
mSuggestFocusListener
Update query text based on transitions in and out of suggestions list. |
(package private) View.OnKeyListener |
mSuggestionsKeyListener
React to the user typing while the suggestions are focused. |
(package private) AdapterView.OnItemSelectedListener |
mSuggestSelectedListener
Update query text based on movement of selection in/out of suggestion list |
(package private) View.OnKeyListener |
mTextKeyListener
React to the user typing "enter" or other hardwired keys while typing in the search box. |
| Fields inherited from class android.app.Dialog |
|---|
mCancelable, mContext, mDecor, mWindow, mWindowManager |
| Fields inherited from interface android.content.DialogInterface |
|---|
BUTTON1, BUTTON2, BUTTON3 |
| Constructor Summary | |
|---|---|
SearchDialog(Context context)
Constructor - fires it up and makes it look like the search UI. |
|
| Method Summary | |
|---|---|
void |
dismiss()
Dismiss the search dialog. |
void |
onConfigurationChanged(Configuration newConfig)
Hook for updating layout on a rotation |
protected void |
onCreate(Bundle savedInstanceState)
We create the search dialog just once, and it stays around (hidden) until activated by the user. |
boolean |
onKeyDown(int keyCode,
KeyEvent event)
Dialog's OnKeyListener implements various search-specific functionality |
void |
onPackageListChange()
The list of installed packages has just changed. |
void |
onRestoreInstanceState(Bundle savedInstanceState)
Restore the state of the dialog from a previously saved bundle. |
Bundle |
onSaveInstanceState()
Save the minimal set of data necessary to recreate the search |
(package private) void |
setupSuggestionIntent(Cursor c,
SearchableInfo si)
When a particular suggestion has been selected, perform the various lookups required to use the suggestion. |
void |
show()
The default show() for this Dialog is not supported. |
boolean |
show(String initialQuery,
boolean selectInitialQuery,
ComponentName componentName,
Bundle appSearchData,
boolean globalSearch)
Set up the search dialog |
(package private) void |
updateSuggestionsWithCursor(Cursor c,
SearchableInfo searchable)
A new cursor (with suggestions) is ready for use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final String LOG_TAG
static final int DBG_JAM_THREADING
IntentFilter mCloseDialogsFilter
IntentFilter mPackageFilter
View.OnKeyListener mGoButtonKeyListener
View.OnClickListener mGoButtonClickListener
View.OnKeyListener mTextKeyListener
View.OnKeyListener mSuggestionsKeyListener
View.OnFocusChangeListener mSuggestFocusListener
AdapterView.OnItemSelectedListener mSuggestSelectedListener
| Constructor Detail |
|---|
public SearchDialog(Context context)
context - Application Context we can use for system acess| Method Detail |
|---|
protected void onCreate(Bundle savedInstanceState)
onCreate in class DialogsavedInstanceState - If this dialog is being reinitalized after a
the hosting activity was previously shut down, holds the result from
the most recent call to Dialog.onSaveInstanceState(), or null if this
is the first time.
public boolean show(String initialQuery,
boolean selectInitialQuery,
ComponentName componentName,
Bundle appSearchData,
boolean globalSearch)
Returns - true if search dialog launched, false if notpublic void show()
show in class Dialogpublic void dismiss()
dismiss in interface DialogInterfacedismiss in class Dialogpublic Bundle onSaveInstanceState()
onSaveInstanceState in class Dialogpublic void onRestoreInstanceState(Bundle savedInstanceState)
onRestoreInstanceState in class DialogsavedInstanceState - The state of the dialog previously saved by
onSaveInstanceState().public void onConfigurationChanged(Configuration newConfig)
public void onPackageListChange()
public boolean onKeyDown(int keyCode,
KeyEvent event)
onKeyDown in interface KeyEvent.CallbackonKeyDown in class DialogkeyCode - This is the keycode of the typed key, and is the same value as
found in the KeyEvent parameter.event - The complete event record for the typed key
Dialog.onKeyUp(int, android.view.KeyEvent),
KeyEvent
void updateSuggestionsWithCursor(Cursor c,
SearchableInfo searchable)
void setupSuggestionIntent(Cursor c,
SearchableInfo si)
c - The suggestions cursor, moved to the row of the user's selectionsi - The searchable activity's info record
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||