Playing a video before the main screen of the app
in my app i want to add a video before the main screen shows up. That means when clicked on the icon of the app, it should show a video (for eg. as seen in games before they start) . can anyone tell me ho开发者_高级运维w it is done.
Commonly, there is a "splash screen" activity that displays a graphic/video and launches your "main screen" activity after few seconds (or after the video is over). This "splash screen" should be manifested as the one to be started by the application launcher in the AndroidManifest.xml.
I think you should do Google for the same. but still FYI, there is already VideoView provided by android.
XML:
<VideoView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/videoView1">
</VideoView>
精彩评论