sk.baka.ambient.activity.search
Class SearchActivity

java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by sk.baka.ambient.activity.search.SearchActivity
All Implemented Interfaces:
ComponentCallbacks, KeyEvent.Callback, LayoutInflater.Factory, View.OnCreateContextMenuListener, Window.Callback

public final class SearchActivity
extends Activity

The search activity, searches for miscellaneous data.

Author:
Martin Vysny

Field Summary
static String INTENTKEY_MODEL
          When an intent is sent to the main activity, this key will hold the List<TrackMetadataBean> of results.
static String INTENTKEY_QUERY
          A query string.
static String INTENTKEY_RESULTTYPE
          Holds type of model data - the SearchType enum.
static String INTENTKEY_STRING
          A response string.
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
SearchActivity()
           
 
Method Summary
static List<TrackMetadataBean> getModel(Bundle bundle)
          Returns stored tracks from the bundle.
static String getQuery(Bundle bundle)
          Returns stored query from the bundle.
static SearchType getType(Bundle bundle)
          Returns stored query from the bundle.
protected  void onCreate(Bundle icicle)
           
protected  void onDestroy()
           
protected  void onNewIntent(Intent intent)
           
(package private)  void stringItemClicked(String item)
          A string item was clicked.
 
Methods inherited from class android.app.Activity
addContentView, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchTouchEvent, dispatchTrackballEvent, finalize, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onActivityResult, onApplyThemeResource, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onKeyDown, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPause, onPostCreate, onPostResume, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestart, onRestoreInstanceState, onResume, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVolumeControlStream, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
attachBaseContext, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTENTKEY_MODEL

public static final String INTENTKEY_MODEL
When an intent is sent to the main activity, this key will hold the List<TrackMetadataBean> of results.

See Also:
Constant Field Values

INTENTKEY_QUERY

public static final String INTENTKEY_QUERY
A query string.

See Also:
Constant Field Values

INTENTKEY_STRING

public static final String INTENTKEY_STRING
A response string.

See Also:
Constant Field Values

INTENTKEY_RESULTTYPE

public static final String INTENTKEY_RESULTTYPE
Holds type of model data - the SearchType enum.

See Also:
Constant Field Values
Constructor Detail

SearchActivity

public SearchActivity()
Method Detail

onCreate

protected void onCreate(Bundle icicle)
Overrides:
onCreate in class Activity

onDestroy

protected void onDestroy()
Overrides:
onDestroy in class Activity

onNewIntent

protected void onNewIntent(Intent intent)
Overrides:
onNewIntent in class Activity

stringItemClicked

void stringItemClicked(String item)
A string item was clicked. Close the activity and fire intent.

Parameters:
item - the item being clicked.

getModel

public static List<TrackMetadataBean> getModel(Bundle bundle)
Returns stored tracks from the bundle.

Parameters:
bundle - the bundle.
Returns:
stored tracks.

getQuery

public static String getQuery(Bundle bundle)
Returns stored query from the bundle.

Parameters:
bundle - the bundle.
Returns:
stored tracks.

getType

public static SearchType getType(Bundle bundle)
Returns stored query from the bundle.

Parameters:
bundle - the bundle.
Returns:
stored tracks.


Copyright © 2007-2008. All Rights Reserved.