|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.view.ContextThemeWrapper
android.app.Activity
android.app.ListActivity
sk.baka.ambient.activity.main.MainActivity
public class MainActivity
The main activity. Handles GUI operations for all GUI components.
| Field Summary | |
|---|---|
(package private) ControllerGroup |
controllers
The list of switchable controllers. |
static java.lang.String |
INTENTDATA_ACTIVITY
Send an intent with the activity enum name put under this key to activate the activity. |
static java.lang.String |
INTENTDATA_STORECONFIG
Send an intent having this extra to save a configuration. |
static java.lang.String |
INTENTKEY_ZOOM
Sets a new zoom level. |
| 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 | |
|---|---|
MainActivity()
|
|
| Method Summary | |
|---|---|
void |
activateAction(ActionsEnum action,
boolean cycle)
Executes given action. |
boolean |
dispatchKeyEvent(android.view.KeyEvent event)
|
boolean |
dispatchTrackballEvent(android.view.MotionEvent ev)
|
void |
onCreate(android.os.Bundle icicle)
|
protected void |
onDestroy()
|
protected void |
onNewIntent(android.content.Intent intent)
|
boolean |
onOptionsItemSelected(android.view.MenuItem item)
|
boolean |
onPrepareOptionsMenu(android.view.Menu menu)
|
protected void |
onStart()
|
protected void |
onStop()
|
void |
reinit(AppState state)
Cherry-picks values from the application state and reinitializes itself. |
void |
storeState(AppState state)
Stores the components state into the global state. |
| Methods inherited from class android.app.ListActivity |
|---|
getListAdapter, getListView, getSelectedItemId, getSelectedItemPosition, onContentChanged, onListItemClick, onRestoreInstanceState, setListAdapter, setSelection |
| Methods inherited from class android.app.Activity |
|---|
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchTouchEvent, 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, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onKeyDown, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onOptionsMenuClosed, onPanelClosed, onPause, onPostCreate, onPostResume, onPrepareDialog, onPreparePanel, onRestart, onResume, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, 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 |
|---|
public static final java.lang.String INTENTDATA_ACTIVITY
public static final java.lang.String INTENTKEY_ZOOM
EnumMap.
public static final java.lang.String INTENTDATA_STORECONFIG
ControllerGroup controllers
| Constructor Detail |
|---|
public MainActivity()
| Method Detail |
|---|
public void onCreate(android.os.Bundle icicle)
onCreate in class android.app.Activityprotected void onDestroy()
onDestroy in class android.app.Activityprotected void onStop()
onStop in class android.app.Activityprotected void onStart()
onStart in class android.app.Activity
public void activateAction(ActionsEnum action,
boolean cycle)
action - the action to take, must not be null.cycle - if true then random/repeat modes are cycled
instead of being activated.public void reinit(AppState state)
AppState.IAppStateAware
reinit in interface AppState.IAppStateAwarestate - the just-loaded statepublic void storeState(AppState state)
AppState.IAppStateAware
storeState in interface AppState.IAppStateAwarestate - the object to store to.protected void onNewIntent(android.content.Intent intent)
onNewIntent in class android.app.Activitypublic boolean onPrepareOptionsMenu(android.view.Menu menu)
onPrepareOptionsMenu in class android.app.Activitypublic boolean onOptionsItemSelected(android.view.MenuItem item)
onOptionsItemSelected in class android.app.Activitypublic boolean dispatchKeyEvent(android.view.KeyEvent event)
dispatchKeyEvent in interface android.view.Window.CallbackdispatchKeyEvent in class android.app.Activitypublic boolean dispatchTrackballEvent(android.view.MotionEvent ev)
dispatchTrackballEvent in interface android.view.Window.CallbackdispatchTrackballEvent in class android.app.Activity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||