we have a tutorial on :src: Passing Data to (Sub)Activities.
If I have some final values I prefer to store them in a Interface. Sample from AndNav:
Using java Syntax Highlighting
- public interface Constants {
- /** Overall DebugTag for whole AndNav. */
- public final String DEBUGTAG = "ANDNAV_DEBUGTAG";
- /** Shall be used if only one SubActivity is closed.*/
- public final int SUBACTIVITY_RESULTCODE_UP_ONE_LEVEL = 0;
- /** Shall be used if a chain of SubActivities is to be closed.*/
- public final int SUBACTIVITY_RESULTCODE_CHAINCLOSE = SUBACTIVITY_RESULTCODE_UP_ONE_LEVEL + 1;
- /** Shall be used to go back one level in the dialog-process. */
- public final int SUBACTIVITY_RESULTCODE_SUCCESS = SUBACTIVITY_RESULTCODE_CHAINCLOSE + 1;
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
Regards,
plusminus











