View.Foreground Property

Definition

Returns the drawable used as the foreground of this View. -or- Supply a Drawable that is to be rendered on top of all of the content in the view.

public virtual Android.Graphics.Drawables.Drawable? Foreground { [Android.Runtime.Register("getForeground", "()Landroid/graphics/drawable/Drawable;", "GetGetForegroundHandler", ApiSince=23)] get; [Android.Runtime.Register("setForeground", "(Landroid/graphics/drawable/Drawable;)V", "GetSetForeground_Landroid_graphics_drawable_Drawable_Handler", ApiSince=23)] set; }
[<get: Android.Runtime.Register("getForeground", "()Landroid/graphics/drawable/Drawable;", "GetGetForegroundHandler", ApiSince=23)>]
[<set: Android.Runtime.Register("setForeground", "(Landroid/graphics/drawable/Drawable;)V", "GetSetForeground_Landroid_graphics_drawable_Drawable_Handler", ApiSince=23)>]
member this.Foreground : Android.Graphics.Drawables.Drawable with get, set

Property Value

a Drawable or null if no foreground was set

Attributes

Remarks

Property getter documentation:

Returns the drawable used as the foreground of this View. The foreground drawable, if non-null, is always drawn on top of the view's content.

Java documentation for android.view.View.getForeground().

Property setter documentation:

Supply a Drawable that is to be rendered on top of all of the content in the view.

Java documentation for android.view.View.setForeground(android.graphics.drawable.Drawable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to