java
java

Reputation: 1165

Animated splash-screen android in xml-format (layer-list)

Is it possible to make an animated splash-screen when just using a drawable xml-file (with layer-list) and call this from android Manifest file:

android:theme="@style/AppTheme.Launcher">

/style

   <!-- SPLASH TEST-->
<style name="AppTheme.Launcher">
    <item name="android:windowBackground">@drawable/launch_screen</item>
</style>

xml-file

<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">

<item android:drawable="@color/colorPrimary"/>
<item>

    <bitmap
        android:src="@drawable/android_splash"
        android:gravity="center"/>
</item>

Let say I have 5 images of android_splash (1 2 3 4 5), could I make changes in the launch-screen.xml så that the splash-screen animates? Then how would it look like in code?

cincerely

Upvotes: 4

Views: 2832

Answers (0)

Related Questions