View.Background プロパティ

定義

背景描画可能を取得します。または、背景を指定した Drawable に設定するか、背景を削除します。

public virtual Android.Graphics.Drawables.Drawable? Background { [Android.Runtime.Register("getBackground", "()Landroid/graphics/drawable/Drawable;", "GetGetBackgroundHandler")] get; [Android.Runtime.Register("setBackground", "(Landroid/graphics/drawable/Drawable;)V", "GetSetBackground_Landroid_graphics_drawable_Drawable_Handler")] set; }
[<get: Android.Runtime.Register("getBackground", "()Landroid/graphics/drawable/Drawable;", "GetGetBackgroundHandler")>]
[<set: Android.Runtime.Register("setBackground", "(Landroid/graphics/drawable/Drawable;)V", "GetSetBackground_Landroid_graphics_drawable_Drawable_Handler")>]
member this.Background : Android.Graphics.Drawables.Drawable with get, set

プロパティ値

このビューの背景として使用される描画可能 (存在する場合)。

属性

注釈

プロパティ getter のドキュメント:

描画可能な背景を取得します

android.view.View.getBackground()Java ドキュメント。

プロパティ セッターのドキュメント:

背景を特定の Drawable に設定するか、背景を削除します。 背景にパディングがある場合、このビューのパディングは背景のパディングに設定されます。 ただし、背景が削除されると、このビューのパディングはタッチされません。 パディングの設定が必要な場合は、 を使用 #setPadding(int, int, int, int)してください。

android.view.View.setBackground(android.graphics.drawable.Drawable)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象

こちらもご覧ください