我想要实现的是对话框一样透明并且能够完全显示RelativeLayout内容的活动。以下是该活动的XML代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="50dip"
android:layout_marginLeft="8dip"
android:layout_marginRight="8dip"
android:layout_marginTop="50dip">
(...)
</RelativeLayout>
</LinearLayout>
而这是明显的:
<activity
android:name="com.acentic.rcontrol.activities.MyActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
现在背景仍然可见,我做错了什么?
--- 编辑: 我添加了
android:background="#c0000000"
现在我的LinearLayout的背景是透明的,正如我想要的那样,但是RelativeLayout中的TextView也变成了透明的...我该如何修改呢?