những gì tôi muốn đạt được là hoạt động có tính trong suốt giống như hộp thoại với khả năng hiển thị 100% nội dung RelativeLayout. Đây là xml hoạt động của:Hoạt động với nền trong suốt
<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>
và điều này là hiển nhiên:
<activity
android:name="com.acentic.rcontrol.activities.MyActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
Ngay bây giờ nền vẫn có thể nhìn thấy, những gì tôi làm sai?
--- EDIT: tôi thêm
android:background="#c0000000"
để LinearLayout. Bây giờ nền là minh bạch như tôi muốn, nhưng cũng TextViews bên trong RelativeLayout cũng minh bạch .. làm thế nào để thay đổi nó?
bản sao có thể có của [Cách tạo hoạt động trong suốt trong Android?] (Http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android) – g00dy
đặt android: background = " # 000000 "vào mã kiểm tra RelativeLayout – sweggersen
trong liên kết hoạt động với tôi. http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android/38589105#38589105 –