I have a layout where a splash screen asks for input from a user, and upon getting the appropriate input it slides away off the top of the screen, revealing the main interface of the app. The splash screen bit of the layout is a RelativeLayout hierarchically at the same level as the LinearLayout which contains the main interface.
Due to constraints of the application these can’t be two separate activities. Here’s the animation XML I’m using to make the splash slide away.
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="600"
android:fromYDelta="0%"
android:toYDelta="-100%"
android:startOffset="300"
/>
</set>
and
launchLayout.startAnimation(mSlideOutTop);
launchLayout.setVisibility(View.GONE);
this works really well, but it seems like after the start-offset of 300ms when the view actually starts to move, all of the views from the main layout of the app move in front of it, z-axis-wise. So rather than sliding up to reveal the interface, the interface pops up on top of the sliding splash screen. How can I make the other views remain in the background until the animation is finished? Thanks!
What if you used a view flipper and the built in android animations? You could put both of the screens you need to display into it and then flip back and forth as needed.
R.anim: http://developer.android.com/reference/android/R.anim.html
View Flipper: http://developer.android.com/reference/android/widget/ViewFlipper.html