Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/195.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何在我的应用加载时删除白色屏幕?_Android - Fatal编程技术网

Android 如何在我的应用加载时删除白色屏幕?

Android 如何在我的应用加载时删除白色屏幕?,android,Android,AndroidManifest.xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.test" android:versionCode="1" android:versionName="1.0" > <uses-sdk

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.test"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme.NoTitle" >
        <activity
            android:name="com.example.test.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
activity_main.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bg"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

</RelativeLayout>

这是一个非常简单的应用程序,几乎和它生成时一样

我也用它来删除标题


当我打开应用程序时,一个白色屏幕出现不到一秒钟,然后蓝色屏幕出现。我怎样才能改变这一点呢?

一个简单快捷的方法是使您的启动屏幕半透明

<activity
        android:name="com.taxeeta.BookingExperience"
        android:configChanges="keyboardHidden|orientation"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Translucent.NoTitleBar"
        android:windowSoftInputMode="stateAlwaysHidden" />


非常感谢!!我试图做一个slpash屏幕和创建活动等。。然后就这一小行:)为什么这不是默认值我无法理解。。。谢谢此解决方案对我没有帮助,因为使用
final ActionBar ActionBar=getActionBar()将返回null这是一个非常棒的解决方案使启动屏幕
Transculent
结果延迟打开应用程序,直到执行
主活动中完成的
操作,但答案对我没有帮助…但它帮助了我,现在我的应用程序中没有白色屏幕
<activity
        android:name="com.taxeeta.BookingExperience"
        android:configChanges="keyboardHidden|orientation"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Translucent.NoTitleBar"
        android:windowSoftInputMode="stateAlwaysHidden" />