I think Dianne meant something like: class MyActivity .... {
enum ViewMode { MAIN, DETAILS, INFO, ABOUT }; private ViewMode mViewMode; .... somewhere in the activity's code: setContentView(R.layout.main); mViewMode = ViewMode.MAIN; ................... setContentView(R.layout.details); mViewMode = ViewMode.DETAILS; } -- K 2012/5/16 Narendra Singh Rathore <nsr.curi...@gmail.com> > > > Honestly don't try to be clever. > > > That wasn't cleverness, but the curiosity. > > > >> just have your own variable that keeps track of the last kind of content >> view you set. >> > > Ok, How? > Do you mean, doing like *View v=findViewById(R.layout.main)*; or > something else? > > > >> Be careful about ViewFlipper, since I believe it means that all of the >> view hierarchies will stay instantiated all of the time. >> > > Yes, you are right. But my target is to use multiple views in a single > activity, displaying a single at a time, which I guess may be fulfilled > using ViewFlipper. > > > >> And ultimately, this is the kind of thing that Fragment is for. Use that. >> > > Well, currently, I am not having any idea using fragment, so have to look > after that. > > > > Thanks n Regards, > NSR > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en