I have been messing around with android for a little over a week now and know a fair amount, yet still lack a ton of knowledge. I am trying to use an mp4 as a splash screen movie activity. And the methods I was told to use all give me a horrible effect. I want a fullscreen horizontal/landscape movie with nothing on the device except the movie...no video controls etc.. I also want the video to be able to be clicked on and destroyed. If you could help I would greatly appreciate any efforts.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I managed to do this and given below is my code for it. First listed is the Activity and later the layout is given.
The activity is declared in the manifest file as follows:
As you can see the orientation is set to landscape so the splash screen will always appear in landscape mode. Setting the theme of this activity to @android:style/Theme.NoTitleBar.Fullscreen is important. It makes the video to cover the whole screen. It is important to understand that Android cant scale your video to the displays resolution. So if your videos resolution does not match the device's resolution, you will see black borders to left/right or top/bottom of the video - depending on your videos resolution.
The contents of the layout file splash.xml are given below:
Dont hardcode the package name. Instead you could do this "android.resource://" + getPackageName() + "/"+R.raw.VideoName