Drawable.GetPadding(Rect) Method

Definition

Return in padding the insets suggested by this Drawable for placing content inside the drawable's bounds.

[Android.Runtime.Register("getPadding", "(Landroid/graphics/Rect;)Z", "GetGetPadding_Landroid_graphics_Rect_Handler")]
public virtual bool GetPadding (Android.Graphics.Rect padding);
[<Android.Runtime.Register("getPadding", "(Landroid/graphics/Rect;)Z", "GetGetPadding_Landroid_graphics_Rect_Handler")>]
abstract member GetPadding : Android.Graphics.Rect -> bool
override this.GetPadding : Android.Graphics.Rect -> bool

Parameters

padding
Rect

Returns

true if this drawable actually has a padding, else false. When false is returned, the padding is always set to 0.

Attributes

Remarks

Return in padding the insets suggested by this Drawable for placing content inside the drawable's bounds. Positive values move toward the center of the Drawable (set Rect.inset).

Java documentation for android.graphics.drawable.Drawable.getPadding(android.graphics.Rect).

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