2013-07-24 56 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>