|
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.content.Context
android.content.ContextWrapper
android.view.ContextThemeWrapper
android.app.Activity
android.app.ListActivity
android.test.TestListActivity
public abstract class TestListActivity
Activity base class to use to implement your application's tests.
Implement the getTestSuite() method to return the name of your test suite class.
See the android.test package documentation (click the more... link) for a full description Not needed for SDK
| Field Summary | |
|---|---|
(package private) static int |
MODE_GROUP
"Mode" group in the menu. |
(package private) String |
mSuite
Our suite |
(package private) String[] |
mTests
Our children tests |
static String |
PERFORMANCE_TESTS
Supplied in the intent extras if we are running performance tests. |
| Fields inherited from class android.app.ListActivity |
|---|
mAdapter, mList |
| 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 |
| Constructor Summary | |
|---|---|
TestListActivity()
Constructor that doesn't do much. |
|
| Method Summary | |
|---|---|
abstract String |
getTestSuite()
Subclasses should implement this to return the names of the classes of their tests. |
void |
onCreate(Bundle icicle)
Typical onCreate(Bundle icicle) implementation. |
boolean |
onCreateOptionsMenu(Menu menu)
Initialize the contents of the Activity's standard options menu. |
protected void |
onListItemClick(ListView l,
View v,
int position,
long id)
This method will be called when an item in the list is selected. |
boolean |
onOptionsItemSelected(MenuItem item)
This hook is called whenever an item in your options menu is selected. |
boolean |
onPrepareOptionsMenu(Menu menu)
Prepare the Screen's standard options menu to be displayed. |
protected void |
onResume()
Called after Activity.onRestoreInstanceState(android.os.Bundle), Activity.onRestart(), or
Activity.onPause(), for your activity to start interacting with the user. |
| Methods inherited from class android.app.ListActivity |
|---|
getListAdapter, getListView, getSelectedItemId, getSelectedItemPosition, onContentChanged, onRestoreInstanceState, setListAdapter, setSelection |
| Methods inherited from class android.view.ContextThemeWrapper |
|---|
attachBaseContext, getTheme, setTheme |
| 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 String PERFORMANCE_TESTS
static final int MODE_GROUP
String mSuite
String[] mTests
| Constructor Detail |
|---|
public TestListActivity()
| Method Detail |
|---|
public abstract String getTestSuite()
public void onCreate(Bundle icicle)
onCreate in class Activityicicle - 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.Activity.onStart(),
Activity.onSaveInstanceState(android.os.Bundle),
Activity.onRestoreInstanceState(android.os.Bundle),
Activity.onPostCreate(android.os.Bundle)protected void onResume()
ActivityActivity.onRestoreInstanceState(android.os.Bundle), Activity.onRestart(), or
Activity.onPause(), for your activity to start interacting with the user.
This is a good place to begin animations, open exclusive-access devices
(such as the camera), etc.
Keep in mind that onResume is not the best indicator that your activity
is visible to the user; a system window such as the keyguard may be in
front. Use Activity.onWindowFocusChanged(boolean) to know for certain that your
activity is visible to the user (for example, to resume a game).
Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.
onResume in class ActivityActivity.onRestoreInstanceState(android.os.Bundle),
Activity.onRestart(),
Activity.onPostResume(),
Activity.onPause()public boolean onCreateOptionsMenu(Menu menu)
ActivityThis is only called once, the first time the options menu is
displayed. To update the menu every time it is displayed, see
Activity.onPrepareOptionsMenu(android.view.Menu).
The default implementation populates the menu with standard system
menu items. These are placed in the Menu.CATEGORY_SYSTEM group so that
they will be correctly ordered with application-defined menu items.
Deriving classes should always call through to the base implementation.
You can safely hold on to menu (and any items created from it), making modifications to it as desired, until the next time onCreateOptionsMenu() is called.
When you add items to the menu, you can implement the Activity's
Activity.onOptionsItemSelected(android.view.MenuItem) method to handle them there.
onCreateOptionsMenu in class Activitymenu - The options menu in which you place your items.
Activity.onPrepareOptionsMenu(android.view.Menu),
Activity.onOptionsItemSelected(android.view.MenuItem)public boolean onOptionsItemSelected(MenuItem item)
ActivityDerived classes should call through to the base class for it to perform the default menu handling.
onOptionsItemSelected in class Activityitem - The menu item that was selected.
Activity.onCreateOptionsMenu(android.view.Menu)public boolean onPrepareOptionsMenu(Menu menu)
ActivityThe default implementation updates the system menu items based on the activity's state. Deriving classes should always call through to the base class implementation.
onPrepareOptionsMenu in class Activitymenu - The options menu as last shown or first initialized by
onCreateOptionsMenu().
Activity.onCreateOptionsMenu(android.view.Menu)
protected void onListItemClick(ListView l,
View v,
int position,
long id)
ListActivity
onListItemClick in class ListActivityl - The ListView where the click happenedv - The view that was clicked within the ListViewposition - The position of the view in the listid - The row id of the item that was clicked
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||