Another design question for you If I have 5 activities that can result from one activity A->B A->C A->E .... Etc
And activity A has values that need to be passed to all other activites, then do you recommned passing them through intent or should I just have a global static variables in activity A and read the values in any other activity?
Thank you
Definitely don't use static public variables.
You should use:
You can subclass android.app.application and use that class to share data between activities.
public class MyApp extends Application {
String mySharedString = "Hello World";
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.