我试图让我的闪屏的背景变得不透明/透明.我在值中创建了一个colors.xml:
#00000000
然后我有我的splash.xml
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/translucent_black">
android:src="@drawable/splash" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_centerInParent="true">
我觉得我应该在清单中有一些东西,但是我一直都会把错误放进去.如果你真的感觉很活泼,我也可以弄清楚如何让标题栏消失.再次感谢.
解决方法:
简单的方法
指定要使用半透明主题的活动(在manifest.xml中):
android:theme="@android:style/Theme.Translucent"
.../>
高级方法
如果您想要更多自定义,可以创建自己的主题,扩展Translucent主题(manifest.xml):
android:theme="@android:style/Theme.MyTranslucentTheme"
.../>
并在styles.xml中:
@color/transparent_black
#DA000000
标签:transparent,splash-screen,android
来源: https://codeday.me/bug/20190721/1495914.html