有問題在這裏同上述話題 但沒有得到答案暗淡/模糊父佈局背景
我這裏有一個佈局
我需要使用圖像在相同對於底部但具有模糊風格
設置阿爾法於事無補頂部佈局 - 文本的觀點也影響
如何模糊向下佈局的背景
xml here
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:background="#ffffff">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="105"
android:orientation="vertical">
/// top layout with image
<LinearLayout
android:background="@drawable/s"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="45">
</LinearLayout>
//// other set of layouts that i want to add the same iamge but in blur style
<LinearLayout
android:alpha="220"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="60"
android:weightSum="75"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="25">
<TextView
android:id="@+id/brand_name"
android:layout_marginTop="10dp"
android:textSize="25dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SHAKY ISLES"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<ImageView
android:id="@+id/image_icon"
android:layout_width="20dp"
android:layout_height="20dp"
android:background="#000000"
android:layout_below="@+id/brand_name"
android:layout_centerHorizontal="true" />
<TextView
android:text=" 6 - 502 m"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/image_icon"
android:layout_alignRight="@+id/brand_name"
android:layout_alignEnd="@+id/brand_name"
android:layout_below="@+id/brand_name" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="20">
<TextView
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:id="@+id/discription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="22, Customs St E ,Auckland and discription here.22, Customs St E ,Auckland and discription here.22, Customs St E ,Auckland and discription here.22, Customs St E ,Auckland and discription here.22, Customs St E ,Auckland and discription here.22, Customs St E ,Auckland and discription here. "
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
<View
android:id="@+id/boder"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#000000"></View>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="30"
>
<TextView
android:id="@+id/address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="22, Customs St E ,Auckland"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
<View
android:id="@+id/down_border"
android:layout_alignParentTop="true"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#000000"></View>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
any help?在XML
甚至用了XML代碼
???????????? –
它就像兩個佈局頂部有一個含有圖像 第二個我已經添加評論XML包含子佈局過於 所以我要虛化背景圖像,而不會影響子佈局的文本視圖 但孩子的佈局也得到那個模糊的背景 –