i want to display an image.gif in my splash_screen as a drawable xml many people create the splash screen as layout and play the gif as imageView, so they manage to use animation-list features and start the animation onWindowFocusChanged Methode. and as far as i know, using layout as splash screen it's not the right way. it has to be a drawable!! this is my code for splash.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/background" android:gravity="center"/>
<item android:drawable="@drawable/logo" android:gravity="center"/>
<item android:gravity="center" android:bottom="-300dp">
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
<item android:drawable="@drawable/frame1" android:duration="250"/>
<item android:drawable="@drawable/frame2" android:duration="250"/>
<item android:drawable="@drawable/frame3" android:duration="250"/>
<item android:drawable="@drawable/frame4" android:duration="250"/>
</animation-list>
</item>
</layer-list>
by the way the image.gif it's a loading animation and as you can see, i have 2 other images.
i'm not sure if it's possible to do it in this way, but i do like it to be a real splash screen, not just a view shows up first before the mainActivity.
just to edit: i do care about the type of xml, i want it to be a draweble resource file not layout resource file, because as they said, it's the right way to create a splash screen.