开发者

Playing a video before the main screen of the app

开发者 https://www.devze.com 2023-03-12 18:40 出处:网络
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 m

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消