|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectActivity
org.hermit.android.core.HelpActivity
public class HelpActivity
An activity which displays an application's help, in a structured format. Help is supplied via resources arrays; one array contains the titles of the help sections, one contains the texts for each section. Sub-sections can be added.
To use: subclass this activity, and have the subclass call
addHelpFromArrays(int, int)
. Then start this activity when
you need to display help.
It is recommended that you configure this activity to handle orientation and keyboardHidden configuration changes in your app manifest.
Constructor Summary | |
---|---|
HelpActivity()
|
Method Summary | |
---|---|
protected void |
addHelpFromArrays(int titlesId,
int textsId)
Add help to this help activity. |
void |
onCreate(Bundle icicle)
Called when the activity is starting. |
protected void |
onRestoreInstanceState(Bundle inState)
This method is called after onStart() when the activity is being re-initialized from a previously saved state, given here in state. |
void |
onSaveInstanceState(Bundle outState)
Called to retrieve per-instance state from an activity before being killed so that the state can be restored in onCreate(Bundle) or onRestoreInstanceState(Bundle) (the Bundle populated by this method will be passed to both). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HelpActivity()
Method Detail |
---|
public void onCreate(Bundle icicle)
icicle
- Saved application state, if any.protected void onRestoreInstanceState(Bundle inState)
inState
- The data most recently supplied in
onSaveInstanceState(Bundle).public void onSaveInstanceState(Bundle outState)
outState
- A Bundle in which to place any state
information you wish to save.protected void addHelpFromArrays(int titlesId, int textsId)
The parameters are the resource IDs of two arrays; the first contains the titles of the help sections, the second contains the bodies of the sections. The arrays must be the same length.
A title and the corresponding content may both be resource IDs of further arrays. These arrays will be added as sub-sections in the most recently-added section. There must be an enclosing outer section.
If this method is called more than once, help will be added to the top level. (This isn't really recommended.)
titlesId
- Resource ID of the titles array.textsId
- Resource ID of the contents array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |