If you want to keep things simple, you could just have a class of static variables. These would basically be global variables.
Then, when you modify a variable, just redraw the screen (or mark the screen as dirty for later redrawing). On Tuesday, January 22, 2013 4:53:49 PM UTC-6, dashman wrote: > > I'm starting to write an app that'll have several separate screens - maybe > displayed > on the page at the same time (using Fragments) - maybe not. > > They all share a global app state. That is, if one screen modifies the > state, I want it > notified autmatically to the other screens. In the olden days it used to > be > called MVC design. i want my app logic to be centralized with all the > views sharing > a single instance and be notified when someting changes. > > > To implement this, Application() sub-class seems to fit the bill. > > 1. If one screen changes a global variable - how to do notify the other > pages of the > change. > > 2.In android my understanding is that there can be one 1 activity active > on the screen. > There's just 1 FragmentActivity active - displaying multple Fragments > right? > > In my case I would all the Fragments to share the same getApplication() > object - but > be able to notify all the fragments on state change. > > > Any suggestions how how to optimally design the app - appreciated. > > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

