I am making a login screen for my Android app and was wondering how can I use a video as a background rather than having an image or simple colors?
I want to make it similar to the Spotify / Bible app login screen where they have a video playing and you have buttons to sign in or register.
Images -
(Click image to enlarge)
Newer versions of Android allow you to create live wallpapers natively. Open the Gallery app, select the video, and choose Set as Live Wallpaper.
Right-click the playback window, then click Video > Set as Wallpaper to apply the video as your desktop wallpaper.
To use a video background we have to use the HTML 5 <video> element with position absolute inside a container wrapper.
You just need a few steps to set the video as the background of your app.
VideoView videoview = (VideoView) findViewById(R.id.videoview); Uri uri = Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.test); videoview.setVideoURI(uri); videoview.start();I have made a video that explains how to create JOOX login screen in android which looks more or less like the Spotify app. Feel free to check it out and let me know if it helps :)
https://youtu.be/tPeDn18FrGY
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With