In eclipse, you can right-click Open Type hierarchy in the menu to obtain the class inheritance relationship.
In the open call hierarchy project, you can find out who called the current function in the project. This helps to understand the "availability" of the current function, especially when readingCodeIs very useful.
Java code
- Intent I =NewIntent (This, Activity1.Class);
- I. addflags (intent. flag_activity_reorder_to_front );
- Startactivity (I );
Intent I = new intent (this, activity1.class); I. addflags (intent. flag_activity_reorder_to_front); startactivity (I );
This method is used to call an activity. If the activity is in the stack, it runs its onstart and onresume functions instead of oncreate functions. In this way, the final running status of the activity can be saved.
Android custom global variables:
Class MyApp extends application {
Private string mystate;
Public String getstate (){
Return mystate;
}
Public void setstate (string s ){
Mystate = s;
}
}
Class blah extends activity {
@ Override
Public void oncreate (bundle B ){
...
MyApp appstate = (MyApp) getapplicationcontext ());
String state = appstate. getstate ();
...
}
}
.