On Sat, Jul 24, 2010 at 2:28 AM, Luca Carlon <[email protected]> wrote:
> Would it be possible to switch the content of the activity this way > Sure. You can have one main layout that has two sub layouts and hide the one you don't need when necessary. You could also look into ViewFlipper. > without running another activity (I have another technical difficult in > doing that)? > If running another activity is what you want to do, that's what you should do. What's the "technical difficult" you're having doing that? > I tried using setContentView(videoView), and then switching back with > setContentView(T.layout.main), but it seems that, when going back to > the main layout, all my buttons and text boxes are created again as > they were new. > That's because they are. When you use setContentView, as you have seen, you're basically loading the default version of the layout. > Would it be possible to go back to the last state of all the controls? > Sure, but you would have to save the state yourself and restore it on switching. This sounds like overkill given the other options at your disposal. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- 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

