Android Guides | Samples

Android.Views.View.Background Property

Gets the background drawable

Syntax

[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")]
public virtual Drawable Background { get; set; }

See Also

Remarks

Get method documentation[Android Documentation]
Gets the background drawable

Set method documentation[Android Documentation]
Set the background to a given Drawable, or remove the background. If the background has padding, this View's padding is set to the background's padding. However, when a background is removed, this View's padding isn't touched. If setting the padding is desired, please use View.SetPadding(Int32,Int32,Int32,Int32).

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1