I'm messing with Android for a while for a while and know a reasonable amount, still still Lack of a ton of knowledge I'm trying to use an MP3 as a splash screen movie activity. And I was asked to use those methods which give me a terrible effect. I would like a full screen horizontal / landscape film that is nothing but the device except the movie ... no video control etc. I also want the video to be clicked and deleted. If you can help, then I appreciate any effort.
I have been able to do this and given below is the code listed for my first and after The layout is given in
package com.adnan.demo; Import android App Import android.content.Intent; Import android Media. media Player; Import android.media.MediaPlayer.OnCompletionListener; Importroid.os.Bundle; Import android.widget.VideoView; Public Class Splash execution tool ending listener {@Override Creatives (bundled saved instenstate) on public zero {super.onCreate (savedInstanceState); SetContentView (R.layout.splash); Watch Video Video = (Watch Video) VVBIID (R.D.VideoView); Video.setVideoPath ("android.resource: //com.agileone/raw/" + R.raw.splash); Video.start (); Video.setOnCompletionListener (this); } @ Override Public Nil Termination (Media Player MP) {intent = new intent (this, home class); StartActivity; End(); }} Activity has been declared in the manifest file as follows:
& amp; Activity Activity: Name = ". Splash" Android: ScreenErmentation = "Scenario" Android: Theme = "@Android: Style / Theme. No Titles Bore. Fullscreen" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; As you can see that the orientation is set to landscape, the splash screen will always appear in landscape mode. Set the topic of this activity for @Android: style / theme Any title Fullscreen is important It makes the video to cover the entire screen. It is important to understand that Android content scales its video on display resolution. So if your video resolution does not match the resolution of the device, then you will see black borders on the left / right or top / bottom of the video depending on your video resolution.
The content of the layout file splash is given below:
& Lt; / FrameLayout & gt;
Comments
Post a Comment