小编Ani*_*ike的帖子

如何在 Splashscreen API 中删除闪屏图标周围的圆形遮罩?

我有一个活动应用程序,并且正在使用 SplashScreen API。我使用图层列表可绘制图标作为图标,但它周围似乎有一个圆形框架。我尝试过仅使用图标的 png 文件,但仍然遇到同样的问题。

样式.xml

<style name="Theme.App.Starting" parent="Theme.SplashScreen">
        // Set the splash screen background, animated icon, and animation duration.
        <item name="windowSplashScreenBackground">@color/sailor_blue</item>

        // Use windowSplashScreenAnimatedIcon to add either a drawable or an
        // animated drawable. One of these is required.
        <item name="windowSplashScreenAnimatedIcon">@drawable/splash_screen_layer_list</item>

        // Set the theme of the Activity that directly follows your splash screen.
        <item name="postSplashScreenTheme">@style/Theme.SimpleCrypto.NoActionBar</item>
    </style>
Run Code Online (Sandbox Code Playgroud)

splash_screen_layer_list.xml

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/sailor_blue" />
    <item
        android:drawable="@drawable/simple_crypto_logo"
        android:gravity="center" />
</layer-list>
Run Code Online (Sandbox Code Playgroud)

安卓清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.decagon.anietie.simplecrypto" …
Run Code Online (Sandbox Code Playgroud)

android kotlin

13
推荐指数
2
解决办法
3309
查看次数

标签 统计

android ×1

kotlin ×1