英文:
Flutter splash screen, a white circle for andorid, is there a way to change that to black or any other color?
问题
以下是翻译的内容:
Android 屏幕,正如您所看到的,位于上方的白色圆圈,有办法更改它的颜色吗
iPhone 屏幕,对于 iPhone 部分,它运行得很好,有点符合我的要求
尝试过调整背景图像以及图像大小,但任何帮助都将不胜感激。想要去掉 Android 屏幕中的那个白色圆圈。
英文:
Iphone Screen, it is working great for the iphone side, kinda what i want
Tried messing with the background image as well as the image size but any help would be great. Want to get rid of that white circle in the android screen.
答案1
得分: 1
我维护一个名为 flutter_native_splash
的包,它允许您轻松地修改 Android 12 图标的背景颜色,以及许多其他参数。 在该包中,您需要更改以下参数:
flutter_native_splash:
android_12:
# 应用程序图标的背景颜色。
icon_background_color: "#111111"
英文:
I maintain a package flutter_native_splash
that allows you to easily modify the Android 12 icon background color, among many other parameters. In that package, you would change the following parameter:
flutter_native_splash:
android_12:
# App icon background color.
icon_background_color: "#111111"
答案2
得分: 0
你需要更改 android/app/src/main/res/drawable
目录下的 launch_background.xml
文件。
<?xml version="1.0" encoding="utf-8"?>
<!-- 修改此文件以自定义启动闪屏屏幕 -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <!-- 这里 -->
<!-- 你可以在这里插入自己的图像资源 -->
<!--
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item>
-->
</layer-list>
英文:
You have to change the launch_background.xml
on android/app/src/main/res/drawable
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <!-- HERE-->
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论