Android Studion Mac:使用原始彩色图像作为初始屏幕

问题描述 投票:-1回答:1

我有一个希望在闪屏上使用的彩色图像。我正在使用from here指南,该指南要求在AppTheme.Launcher style下指定图像,并使用item android:windowBackground通过@Drawable/SplashIcon]指定图像名称

我对如何将图像实际添加到项目感到困惑。到目前为止,我一直在使用菜单操作new -> Image Asset添加图像,该操作可以使颜色变平并且似乎没有可以直接导入的选项。

我已将其拖放到Android Studio的drawable文件夹中,该文件夹会添加图像,但我无法使用Drawable/SplashIcon进行引用。

这是我所拥有的:

enter image description here

enter image description here

如何引用我的图像?

我有一个希望在闪屏上使用的彩色图像。我正在从这里使用指南,该指南要求在AppTheme.Launcher样式下指定图像,并使用android:...

android android-studio splash-screen android-image
1个回答
0
投票

似乎文件名有问题。文件名必须使用小写字母和下划线,其他都不能。

© www.soinside.com 2019 - 2024. All rights reserved.