Activity背景透明页面崩溃问题,也仅仅是8.0才会出现的问题往后的版本均已修复。
Acitvity的父布局写背景透明或者在AndroidManifest里设置theme(主题)样式是透明的都会出现黑屏页面崩溃。
需在AndroidManifest 当前activity加入screenOrientation属性并设置为 behind就不会出现了。
如下图所示:
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent"
/>
这里只是记录一下问题。
希望对各位有所帮助。