问题
Thanks for taking a second and responding to my question if you get the time; I'm fairly new to programming android so any help is great!
I am using Android Studio, and have written an XML layout with multiple layouts in it that I switch between using ViewFlipper.showNext() or ViewFlipper.setDisplayedChild(). Programmatically, everything is working excellent. However, I am using the graphical XML interface of Android Studio and would like to be able to see the layout displayed by showNext() in the graphical interface.
Does anyone know how to manually flip the viewFlipper in the Android Studio graphical interface (or in Eclipse for that matter)?
回答1:
The only way I see is putting the right code part as the first child of the viewflipper to see rendering in the graphical layout.
回答2:
What I do is drag the views that you don't want as the first to the viewflipper. This places/stacks those views underneath the view that you want.
-ViewFlipper -ViewUwant -viewuduntwant
来源:https://stackoverflow.com/questions/20126779/viewflipper-switch-in-android-studio-graphical-interface