我想要這個。請注意文字(即指令)出現在其上的透明圖層。 也檢查背景木製背景。如何減少/增加布局的透明度而不是視圖
餘米試過,但沒有得到預期的效果
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:alpha="0.75" >
<TextView
android:id="@+android:id/txtInstructions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+android:id/relImagesLogo"
android:layout_centerInParent="true"
android:lineSpacingMultiplier="1.5"
android:text="Lorem Ipsum is simply dummy text of
the printing and typesetting industry. Lorem Ipsum has been the
industry's standard dummy text ever since the 1500s, when an unknown
printer took a galley of type and scrambled it to make a type specimen
book. It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised "
android:textColor="@android:color/white"
android:textSize="14sp" />
<RelativeLayout
android:id="@+android:id/relImagesLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" >
<ImageView
android:id="@+android:id/imgInstructionLogo"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="2dp"
android:src="@drawable/instruction_icon" />
<ImageView
android:id="@+android:id/imgInstructionHeading"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_toRightOf="@+android:id/imgInstructionLogo"
android:src="@drawable/instruction_heading" />
</RelativeLayout>
</RelativeLayout>
注意到這一android:alpha="0.75"
正在我所有的意見透明至0.75水平。我不想要這個。我只想要那個透明層。
權利知道我得到這個結果
您需要創建一個可繪製的形狀並將其設置爲佈局組的背景資源 – Pragnani 2013-02-20 08:52:15