Build 1.0_r1(from source)

android.app
Class TabActivity

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 android.app.ActivityGroup
                      extended by android.app.TabActivity
All Implemented Interfaces:
ComponentCallbacks, KeyEvent.Callback, LayoutInflater.Factory, View.OnCreateContextMenuListener, Window.Callback

public class TabActivity
extends ActivityGroup

An activity that contains and runs multiple embedded activities or views.


Field Summary
 
Fields inherited from class android.app.ActivityGroup
mLocalActivityManager
 
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, mActivityInfo, mCalled, mConfigChangeFlags, mCurrentConfig, mDecor, mEmbeddedID, mFinished, mMainThread, mParent, mResultCode, mResultData, mStartedActivity, 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, BLUETOOTH_SERVICE, 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, STATUS_BAR_SERVICE, TELEPHONY_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
TabActivity()
           
 
Method Summary
 TabHost getTabHost()
          Returns the TabHost the activity is using to host its tabs.
 TabWidget getTabWidget()
          Returns the TabWidget the activity is using to draw the actual tabs.
protected  void onChildTitleChanged(Activity childActivity, CharSequence title)
           
 void onContentChanged()
          Updates the screen state (current list and other views) when the content changes.
protected  void onPostCreate(Bundle icicle)
          Called when activity start-up is complete (after Activity.onStart() and Activity.onRestoreInstanceState(android.os.Bundle) have been called).
protected  void onRestoreInstanceState(Bundle state)
          This method is called after Activity.onStart() when the activity is being re-initialized from a previously saved state, given here in state.
protected  void onSaveInstanceState(Bundle outState)
          Called to retrieve per-instance state from an activity before being killed so that the state can be restored in Activity.onCreate(android.os.Bundle) or Activity.onRestoreInstanceState(android.os.Bundle) (the Bundle populated by this method will be passed to both).
 void setDefaultTab(int index)
          Sets the default tab that is the first tab highlighted.
 void setDefaultTab(String tag)
          Sets the default tab that is the first tab highlighted.
 
Methods inherited from class android.app.ActivityGroup
dispatchActivityResult, getCurrentActivity, getLocalActivityManager, onCreate, onDestroy, onPause, onResume, onStop
 
Methods inherited from class android.app.Activity
addContentView, attach, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchTouchEvent, dispatchTrackballEvent, finalize, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getActivityToken, 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, isResumed, isTaskRoot, managedCommitUpdates, managedQuery, managedQuery, moveTaskToBack, onActivityResult, onApplyThemeResource, onConfigurationChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onKeyDown, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPostResume, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestart, onRetainNonConfigurationInstance, onSearchRequested, onStart, onTitleChanged, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, performRestart, performRestoreInstanceState, performResume, performSaveInstanceState, performStart, performStop, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setParent, 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
 

Constructor Detail

TabActivity

public TabActivity()
Method Detail

setDefaultTab

public void setDefaultTab(String tag)
Sets the default tab that is the first tab highlighted.

Parameters:
tag - the name of the default tab

setDefaultTab

public void setDefaultTab(int index)
Sets the default tab that is the first tab highlighted.

Parameters:
index - the index of the default tab

onRestoreInstanceState

protected void onRestoreInstanceState(Bundle state)
Description copied from class: Activity
This method is called after Activity.onStart() when the activity is being re-initialized from a previously saved state, given here in state. Most implementations will simply use Activity.onCreate(android.os.Bundle) to restore their state, but it is sometimes convenient to do it here after all of the initialization has been done or to allow subclasses to decide whether to use your default implementation. The default implementation of this method performs a restore of any view state that had previously been frozen by Activity.onSaveInstanceState(android.os.Bundle).

This method is called between Activity.onStart() and Activity.onPostCreate(android.os.Bundle).

Overrides:
onRestoreInstanceState in class Activity
Parameters:
state - the data most recently supplied in Activity.onSaveInstanceState(android.os.Bundle).
See Also:
Activity.onCreate(android.os.Bundle), Activity.onPostCreate(android.os.Bundle), Activity.onResume(), Activity.onSaveInstanceState(android.os.Bundle)

onPostCreate

protected void onPostCreate(Bundle icicle)
Description copied from class: Activity
Called when activity start-up is complete (after Activity.onStart() and Activity.onRestoreInstanceState(android.os.Bundle) have been called). Applications will generally not implement this method; it is intended for system classes to do final initialization after application code has run.

Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.

Overrides:
onPostCreate in class Activity
Parameters:
icicle - If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in Activity.onSaveInstanceState(android.os.Bundle). Note: Otherwise it is null.
See Also:
Activity.onCreate(android.os.Bundle)

onSaveInstanceState

protected void onSaveInstanceState(Bundle outState)
Description copied from class: Activity
Called to retrieve per-instance state from an activity before being killed so that the state can be restored in Activity.onCreate(android.os.Bundle) or Activity.onRestoreInstanceState(android.os.Bundle) (the Bundle populated by this method will be passed to both).

This method is called before an activity may be killed so that when it comes back some time in the future it can restore its state. For example, if activity B is launched in front of activity A, and at some point activity A is killed to reclaim resources, activity A will have a chance to save the current state of its user interface via this method so that when the user returns to activity A, the state of the user interface can be restored via Activity.onCreate(android.os.Bundle) or Activity.onRestoreInstanceState(android.os.Bundle).

Do not confuse this method with activity lifecycle callbacks such as Activity.onPause(), which is always called when an activity is being placed in the background or on its way to destruction, or Activity.onStop() which is called before destruction. One example of when Activity.onPause() and Activity.onStop() is called and not this method is when a user navigates back from activity B to activity A: there is no need to call Activity.onSaveInstanceState(android.os.Bundle) on B because that particular instance will never be restored, so the system avoids calling it. An example when Activity.onPause() is called and not Activity.onSaveInstanceState(android.os.Bundle) is when activity B is launched in front of activity A: the system may avoid calling Activity.onSaveInstanceState(android.os.Bundle) on activity A if it isn't killed during the lifetime of B since the state of the user interface of A will stay intact.

The default implementation takes care of most of the UI per-instance state for you by calling View.onSaveInstanceState() on each view in the hierarchy that has an id, and by saving the id of the currently focused view (all of which is restored by the default implementation of Activity.onRestoreInstanceState(android.os.Bundle)). If you override this method to save additional information not captured by each individual view, you will likely want to call through to the default implementation, otherwise be prepared to save all of the state of each view yourself.

If called, this method will occur before Activity.onStop(). There are no guarantees about whether it will occur before or after Activity.onPause().

Overrides:
onSaveInstanceState in class ActivityGroup
Parameters:
outState - Bundle in which to place your saved state.
See Also:
Activity.onCreate(android.os.Bundle), Activity.onRestoreInstanceState(android.os.Bundle), Activity.onPause()

onContentChanged

public void onContentChanged()
Updates the screen state (current list and other views) when the content changes.

Specified by:
onContentChanged in interface Window.Callback
Overrides:
onContentChanged in class Activity
See Also:
Activity.onContentChanged()

onChildTitleChanged

protected void onChildTitleChanged(Activity childActivity,
                                   CharSequence title)
Overrides:
onChildTitleChanged in class Activity

getTabHost

public TabHost getTabHost()
Returns the TabHost the activity is using to host its tabs.

Returns:
the TabHost the activity is using to host its tabs.

getTabWidget

public TabWidget getTabWidget()
Returns the TabWidget the activity is using to draw the actual tabs.

Returns:
the TabWidget the activity is using to draw the actual tabs.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature