i'm need to change开发者_StackOverflow中文版 between two deferent layout, i have firs layout .xml file whit two buttons and depending of the button i need to change the layout to a new one and also i need to be able to return to the main layout like using the back button or something like that.
I was trying to change the layouts using setContenview but i keep losing all the buttons and edittext that i previously define.
See ViewFlipper: http://developer.android.com/reference/android/widget/ViewFlipper.html.
You make a ViewFlipper the root view of your layout, then add both layouts to ViewFlipper, and you can simply flip between them.
精彩评论