語言

Window.SetBackgroundDrawableResource(Int32) 方法

定義

將此視窗的背景改為可繪製資源。

[Android.Runtime.Register("setBackgroundDrawableResource", "(I)V", "GetSetBackgroundDrawableResource_IHandler")]
public virtual void SetBackgroundDrawableResource(int resId);
[<Android.Runtime.Register("setBackgroundDrawableResource", "(I)V", "GetSetBackgroundDrawableResource_IHandler")>]
abstract member SetBackgroundDrawableResource : int -> unit
override this.SetBackgroundDrawableResource : int -> unit

參數

resId
Int32

可繪製資源的資源識別碼,將被安裝為新的背景。

屬性

備註

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

Java 文件 android.view.Window.setBackgroundDrawableResource(int)。

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

適用於