語言

Window.SetBackgroundDrawable(Drawable) 方法

定義

將此視窗的背景改成自訂繪製視窗。

[Android.Runtime.Register("setBackgroundDrawable", "(Landroid/graphics/drawable/Drawable;)V", "GetSetBackgroundDrawable_Landroid_graphics_drawable_Drawable_Handler")]
public abstract void SetBackgroundDrawable(Android.Graphics.Drawables.Drawable? drawable);
[<Android.Runtime.Register("setBackgroundDrawable", "(Landroid/graphics/drawable/Drawable;)V", "GetSetBackgroundDrawable_Landroid_graphics_drawable_Drawable_Handler")>]
abstract member SetBackgroundDrawable : Android.Graphics.Drawables.Drawable -> unit

參數

drawable
Drawable

這個視窗背景用來繪製的新可繪圖。

屬性

備註

將此視窗的背景改成自訂繪製視窗。 將背景設為 null 會讓視窗變得不透明。 要讓視窗透明,你可以使用空繪製(例如顏色為 0 的 ColorDrawable,或系統可繪製的 android:drawable/empty)。

Java 文件 android.view.Window.setBackgroundDrawable(android.graphics.drawable.Drawable)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於