【Android】Android android:launchMode=“singleInstance” 页面跳转黑屏


将Activity的启动模式设置为singleInstance,即android:launchMode=“singleInstance” 

当应用跳转到启动模式设置为singleInstance的Activity页面时,出现一段黑屏

修改方式如下

步骤一、在AndroidManifest.xml中设置Activity主题 android:theme="@style/Theme.TitleBar"

<activity
            android:name="ActivityDemo"
            android:launchMode="singleInstance"
            android:theme="@style/Theme.TitleBar" >
 </activity>

步骤二、在\res\values\styles.xml 中添加

    <style name="Theme.TitleBar" parent="android:Theme.Light" />

    <style name="Theme.TitleBar" parent="android:Theme">
        <item name="android:windowIsTranslucent">true</item>
    </style>

 

本文出自 Ray-Ray的博客

文章地址 http://www.cnblogs.com/rayray/archive/2013/03/03/2939060.html

感谢大家的推荐和收藏


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM