我想使用新的Android 12 API的闪屏,但如果我使用我的drawable图标内的主题参数windowSplashScreenAnimatedIcon,其拉伸.如何调整图标的大小?我的图标不是矢量。我必须使用PNG文件。
drawable
windowSplashScreenAnimatedIcon
6uxekuva1#
很可能,您必须遵循闪屏尺寸。谷歌说:
mum43rcc2#
创建2值目录在值中-v31
<style name="SplashScreenTheme" parent="Theme.SplashScreen"> <item name="android:windowSplashScreenBackground">@color/color_121326 </item> <item name="postSplashScreenTheme">@style/SplashScreen</item> <item name="android:windowSplashScreenAnimatedIcon"> @drawable/ic_splash_center </item> <item name="splashScreenIconSize">@dimen/dp_100</item> </style>
和值-v33
<style name="SplashScreenTheme" parent="Theme.SplashScreen"> <item name="android:windowSplashScreenBackground">@color/color_121326 </item> <item name="postSplashScreenTheme">@style/SplashScreen</item> <item name="android:windowSplashScreenAnimatedIcon"> @drawable/drawable_splash </item> <item name="splashScreenIconSize">@dimen/dp_100</item> </style>
在可画的飞溅中
<item android:width="@dimen/dp_100" android:height="@dimen/dp_100" android:gravity="center"> <bitmap android:src="@drawable/ic_splash_center" /> </item>
我发现它的作品调整图标以上api 33
2条答案
按热度按时间6uxekuva1#
很可能,您必须遵循闪屏尺寸。谷歌说:
mum43rcc2#
创建2值目录
在值中-v31
和值-v33
在可画的飞溅中
我发现它的作品调整图标以上api 33