Android Mobile Physical Therapy Exercise Documenter

com.communipatient.amptedapp.util
Class ActivityHelper

java.lang.Object
  extended by com.communipatient.amptedapp.util.ActivityHelper
Direct Known Subclasses:
ActivityHelperHoneycomb

public class ActivityHelper
extends java.lang.Object

A class that handles some common activity-related functionality in the app, such as setting up the action bar. This class provides functioanlity useful for both phones and tablets, and does not require any Android 3.0-specific features.


Field Summary
protected  android.app.Activity mActivity
           
 
Constructor Summary
protected ActivityHelper(android.app.Activity activity)
           
 
Method Summary
static ActivityHelper createInstance(android.app.Activity activity)
          Factory method for creating ActivityHelper objects for a given activity.
 void goSearch()
          Invoke "search" action, triggering a default search.
 boolean onCreateOptionsMenu(android.view.Menu menu)
           
 boolean onKeyDown(int keyCode, android.view.KeyEvent event)
           
 boolean onKeyLongPress(int keyCode, android.view.KeyEvent event)
           
 boolean onOptionsItemSelected(android.view.MenuItem item)
           
 void onPostCreate(android.os.Bundle savedInstanceState)
           
 void setupHomeActivity()
          Method, to be called in onPostCreate, that sets up this activity as the home activity for the app.
 void setupSubActivity()
          Method, to be called in onPostCreate, that sets up this activity as a sub-activity in the app.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mActivity

protected android.app.Activity mActivity
Constructor Detail

ActivityHelper

protected ActivityHelper(android.app.Activity activity)
Method Detail

createInstance

public static ActivityHelper createInstance(android.app.Activity activity)
Factory method for creating ActivityHelper objects for a given activity. Depending on which device the app is running, either a basic helper or Honeycomb-specific helper will be returned.


onPostCreate

public void onPostCreate(android.os.Bundle savedInstanceState)

onCreateOptionsMenu

public boolean onCreateOptionsMenu(android.view.Menu menu)

onOptionsItemSelected

public boolean onOptionsItemSelected(android.view.MenuItem item)

onKeyDown

public boolean onKeyDown(int keyCode,
                         android.view.KeyEvent event)

onKeyLongPress

public boolean onKeyLongPress(int keyCode,
                              android.view.KeyEvent event)

setupHomeActivity

public void setupHomeActivity()
Method, to be called in onPostCreate, that sets up this activity as the home activity for the app.


setupSubActivity

public void setupSubActivity()
Method, to be called in onPostCreate, that sets up this activity as a sub-activity in the app.


goSearch

public void goSearch()
Invoke "search" action, triggering a default search.


Revision: 109 Generated on Sat Dec 10 07:00:03 UTC 2011