您的位置:首页 > 移动开发 > Android开发

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

2014-02-21 13:06 549 查看
将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>


转自: /article/4820641.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: