【Android】Android android:launchMode=“singleInstance” 页面跳转黑屏
16lz
2021-01-23
将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">trueitem> style>
本文出自 Ray-Ray的博客
文章地址 http://www.cnblogs.com/rayray/archive/2013/03/03/2939060.html
感谢大家的推荐和收藏
更多相关文章
- 2012-7-17 固定屏幕显示模式Android: ScreenOrientation,全屏
- Android软键盘显示模式及打开和关闭方式
- Android应用开发Android 常见的设计模式
- iPhone和Android UI模式比较列表
- android设定手机的显示模式,横竖屏,是否全屏
- Android Studio启动安卓虚拟机失败,附Android Studio安装虚拟机步