One Activity three Layout'a?

Good evening, I have three Activity buttons. Separately, I have created three Layout'a and now I wish that when you press buttons on the Activity display different Layout's. What should I do? Direct...
Thank you!
July 9th 19 at 13:16
2 answers
July 9th 19 at 13:18
1. For the two layout set visibility gone, and one Express by clicking on the button toggle the visibility of the other layout.
2. Add three fragments
3. Three activiti
July 9th 19 at 13:20
Certainly replace the Layout by using setContentView as in onCreate, but these buttons will disappear, because they too, in one Layout, and still have to listen (to handle events) elements with each of the three Layout, you want it all mixed together in one Activity class, and then getting confused?

It's absurd, make the three Activity 1 or Activity with 3 buttons (buttons will need only one Layout) and 3 Fragment, which can be switched by buttons.

Find more questions by tags Android