开发者

I want to change back and foward between two layouts

开发者 https://www.devze.com 2023-03-03 18:43 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消