基于this tutorial和this answer,其中还引用this other tutorial,使用主题的android:windowBackground
与<layer-list/>
一起似乎是最批准创建的Android开机画面可以将WindowBackground放置在状态栏下方并位于导航栏上方吗?
使用该技术中心在屏幕上标识的方法很简单;不过,我想要沿着屏幕的顶部或底部定位图形。我遇到了问题,因为在下面的屏幕截图中看到,windowBackground
似乎在屏幕顶部的状态栏和底部的导航栏后面绘制,从而使图形显示截止
问:是否有可能指示windowBackground
摆正自己的位置下方的状态栏和导航栏上方?如果没有,使用windowBackground
启动屏幕技术可以创建一个不包含在状态栏或导航栏中的启动画面?
要重现该问题,创建一个新的Android Studio项目,这将让你的ic_launcher
绘制,并按照上面链接的教程之一,但使用以下layer-list
绘制
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="#000000"/>
<item>
<bitmap
android:gravity="left|top"
android:src="@drawable/ic_launcher"/>
</item>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/ic_launcher"/>
</item>
<item>
<bitmap
android:gravity="bottom"
android:src="@drawable/ic_launcher"/>
</item>
</layer-list>
这工作完全根据需要,谢谢你。 – konata