我想我的Android對話框看起來是這樣的:如何解決我的對話框暗淡和alpha效果
但使用此XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:alpha="0.20"
android:backgroundDimAmount="0.0">
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="0.1" />
<Button
android:id="@+id/socialBtn1"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:scaleType="fitXY"
android:src="@android:color/tab_indicator_text"
android:text="@string/fb_share" />
導致該對話框:
問題:
(1)的按鈕應具有的α= 1,但似乎與阿爾法0.2
(2)的對話框BG應具有的α= 0.2,但是用α1
(3)的bG似乎周圍應與暗淡= 0
非透光bg如何?我想讓周圍的環境變得清晰 –
@EladBenda:我假設圍繞着你,仍然是指對話框內的區域,即圍繞着按鈕。如果是,則在上例中刪除半透明從#AARRGGBB中刪除AA,因此對於黑色不透明背景,它將變爲android:background =「#000000」。 – Mili