停止启动画面进入导航栏

时间:2017-07-21 02:25:29

标签: java android splash-screen splash

我想使用这个启动画面,但它一直在导航栏下。

Splash img

如何在保持导航栏的同时强制它适合屏幕?

   <style name="splashScreenTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen">

    <item name="android:windowBackground">@drawable/splash</item>

</style>

3 个答案:

答案 0 :(得分:10)

找到一个解决方案

Select case when min >= 1 and max <3 then 'A'
            when min >= 2 and max <4 then 'B'
            when min >= 3 and max <5 then 'C'

       else NULL
       end Value

 From table

 <item name="android:windowBackground">@drawable/splash</item>

答案 1 :(得分:-1)

将其添加到启动画面活动的xml文件中。

<FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/splash"/>
    </FrameLayout>

答案 2 :(得分:-1)

您的@drawable/splash应该是这样的:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item
    android:drawable="@color/black"/>

<item>
    <bitmap
        android:gravity="center"
        android:src="@drawable/your_image" />
</item>