2013-07-24 107 views
0

基本上我想要一个半透明/黑色backgound.ie的活动,当新活动启动时,父活动变暗。如何将linearLayout的背景设置为半透明,但不是儿童?

我能得到一个完全透明的背景,但使用以下在我的manifest.xml

<activity android:name="com.xxx.FullPhotoActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" ></activity> 

但我需要的背景是那种暗,但也是透明的。

我也尝试在我的linearlauout中添加alpha,但是它也适用于子元素。

+1

集机器人的组合工作:作为背景=“#66FFFFFF” LinearLayout的属性? – Blackbelt

+0

@blackbelt这不会影响它的孩子吗? – LexLythius

+1

为什么要这样呢?你有没有尝试过 ? – Blackbelt

回答

0

由于黑带的评论我设法得到它与以下

的LinearLayout的背景颜色#EA000000

活动声明<activity android:name="com.xxx.FullPhotoActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" ></activity>