我试图让我的闪屏的背景变得不透明/透明.我在值中创建了一个colors.xml:
<?xml version="1.0" enCoding="utf-8"?><resources><color name="translucent_black">#00000000</color></resources>
然后我有我的splash.xml
<?xml version="1.0" enCoding="utf-8"?><relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:orIEntation="vertical" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" androID:background="@color/translucent_black"> <ImageVIEw androID:layout_wIDth="wrap_content" androID:ID="@+ID/imageVIEw1" androID:src="@drawable/splash" androID:layout_height="wrap_content" androID:layout_gravity="center_horizontal" androID:layout_centerInParent="true"></ImageVIEw></relativeLayout>
我觉得我应该在清单中有一些东西,但是我一直都会把错误放进去.如果你真的感觉很活泼,我也可以弄清楚如何让标题栏消失.再次感谢.
解决方法:
简单的方法
指定要使用半透明主题的活动(在manifest.xml中):
<activity ... androID:theme="@androID:style/theme.Translucent" .../>
高级方法
如果您想要更多自定义,可以创建自己的主题,扩展Translucent主题(manifest.xml):
<activity ... androID:theme="@androID:style/theme.MyTranslucenttheme" .../>
并在styles.xml中:
<?xml version="1.0" enCoding="utf-8"?><resources><style name="MyTranslucenttheme" parent="androID:theme.Translucent"> <item name="androID:windowBackground">@color/transparent_black</item></style><color name="transparent_black">#DA000000</color></resources>
总结 以上是内存溢出为你收集整理的Android启动画面,不透明背景无效全部内容,希望文章能够帮你解决Android启动画面,不透明背景无效所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)