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:
android.content.ComponentCallbacks, android.view.KeyEvent.Callback, android.view.LayoutInflater.Factory, android.view.View.OnCreateContextMenuListener, android.view.Window.Callback

public final class SearchActivity
extends android.app.Activity

The search activity, searches for miscellaneous data.

Author:
Martin Vysny

Field Summary
static java.lang.String INTENTKEY_MODEL
          When an intent is sent to the main activity, this key will hold the List<TrackMetadataBean> of results.
static java.lang.String INTENTKEY_QUERY
          A query string.
static java.lang.String INTENTKEY_RESULTTYPE
          Holds type of model data - the SearchType enum.
static java.lang.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, INPUT_METHOD_SERVICE, 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 java.util.List<TrackMetadataBean> getModel(android.os.Bundle bundle)
          Returns stored tracks from the bundle.
static java.lang.String getQuery(android.os.Bundle bundle)
          Returns stored query from the bundle.
static SearchType getType(android.os.Bundle bundle)
          Returns stored query from the bundle.
protected  void onCreate(android.os.Bundle icicle)
           
protected  void onDestroy()
           
protected  void onNewIntent(android.content.Intent intent)
           
(package private)  void stringItemClicked(java.lang.String item)
          A string item was clicked.
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, 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, hasWindowFocus, 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, onUserInteraction, onUserLeaveHint, 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, setVisible, 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 java.lang.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 java.lang.String INTENTKEY_QUERY
A query string.

See Also:
Constant Field Values

INTENTKEY_STRING

public static final java.lang.String INTENTKEY_STRING
A response string.

See Also:
Constant Field Values

INTENTKEY_RESULTTYPE

public static final java.lang.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(android.os.Bundle icicle)
Overrides:
onCreate in class android.app.Activity

onDestroy

protected void onDestroy()
Overrides:
onDestroy in class android.app.Activity

onNewIntent

protected void onNewIntent(android.content.Intent intent)
Overrides:
onNewIntent in class android.app.Activity

stringItemClicked

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

Parameters:
item - the item being clicked.

getModel

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

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

getQuery

public static java.lang.String getQuery(android.os.Bundle bundle)
Returns stored query from the bundle.

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

getType

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

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


Copyright © 2007-2009. All Rights Reserved.