How display a window for some time only?
How can I put a title screen that displays for five sec开发者_运维技巧onds in my application?
Or how can I put title screen and change the other screen when a user touches the screen?
Use a RelativeLayout.
Nest a RelativeLayout inside it which fills parent in both width and height. Inside this RelativeLayout, nest an ImageView with the src of your splash screen resource. UI Elements behind the splash screen are to be written in a RelativeLayout after the splash screen's RelativeLayout's tag is closed.
Add an android:onClick function to the splash screen's RelativeLayout. In this onClick function, set the android:visibility of the splash screen's RelativeLayout to "gone".
On Activity start, start a Timer, whose on completion, call a TimerTask which sets the android:visibility of the splash screen's RelativeLayout to "gone".
精彩评论