本文介绍了如何去除白色画面,而我的应用程序加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AndroidManifest.xml中:

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>

MainActivity.java:

MainActivity.java:

package com.example.test;

import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

}

activity_main.xml:

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>

这是一个非常简单的应用程序,而这几乎是因为它是当它产生的。

It is a really simple app, and it is almost as it was when it generated.

我也用这个 http://stackoverflow.com/a/14115809/1344937 以去掉标题。

I also used this http://stackoverflow.com/a/14115809/1344937 to remove the title.

当我打开应用程序,一个白色的屏幕出现了不到一秒钟,然后在蓝色屏幕出现。我怎样才能改变这种状况?

When I open the app, a white screen appears for less than a second and then the blue screen comes. How can I change that?

推荐答案

一个快速,简单的方法是使你的启动屏幕半透明。

One quick, easy way is to make your launch screen Translucent.

<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" />

这篇关于如何去除白色画面,而我的应用程序加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 00:15