2
对不起,我确定这是非常基本的东西。Android空白布局出现在背景图片前
在我的应用程序启动到活动中,为我的布局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="@drawable/background2x"
android:id="@+id/mainScreen"
tools:context="com.offyear.www.offyear.WelcomeActivity">
我遇到的问题是,屏幕没有立即加载到,我已经背景图片组。在背景图像和按钮出现之前,它首先加载到空白的白色屏幕大约半秒钟。当然,这并不会破坏我的应用程序的功能或任何其他功能,但它很烦人,看起来马虎。
我需要做些什么才能确保没有初始的空白屏幕?当我的应用程序启动时,用户应该看到的第一件事是背景图像和按钮。
谢谢,并为Android 101的问题表示歉意。
你可以试试[设置半透明的主题(http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-在Android中),或者您可以将此背景设置为清单中的主题。请参阅:http://stackoverflow.com/questions/14307126/black-screen-before-splash-screen-appear-in-android。 – 2014-10-11 18:48:49