關於打開應用白屏或黑屏後進入引導頁的問題

1.在res目錄下,values的styles文件裏面設置:



    <style name="AppSplash" parent="@android:style/Theme">


        <!-- 設置啓動背景透明 -->
        <item name="android:windowIsTranslucent">true</item>


        <!-- 設置啓動不要Title -->
        <item name="android:windowNoTitle">true</item>
    </style>


2.在AndroidManifest.xml裏面在啓動的Activity添加:

<activity
            android:name=".Welcome"
            android:theme="@style/AppSplash"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />


                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>

</activity>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章