I'm doing a menu, and I want each button to open a different layout that is within ViewFlipper
.
That is, according to the button you select in the menu, the ViewFlipper
starts with that selected layout.
When I'm inside the activity that handles ViewFlipper
if I can change them using setDisplayedChild
, but that I can not use it on the menu page.
How can I do it?
<ViewFlipper android:id="@+id/viewFlipper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<include layout="@layout/pagina1"/>
<include layout="@layout/pagina2"/>
<include layout="@layout/pagina3"/>
<include layout="@layout/pagina4"/>
<include layout="@layout/pagina5"/>
</ViewFlipper>