首页 > 解决方案 > xml格式的动画启动屏幕android(图层列表)

问题描述

仅使用可绘制的 xml 文件(带有图层列表)并从 android Manifest 文件中调用它时,是否可以制作动画闪屏:

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

/风格

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

xml 文件

<?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>

假设我有 5 张 android_splash 的图像(1 2 3 4 5),我可以在启动屏幕动画的 launch-screen.xml 中进行更改吗?那么它在代码中会是什么样子呢?

真诚地

标签: androidxmlsplash-screenanimationdrawable

解决方案


推荐阅读