共用方式為


InsetDrawable Constructors

Definition

Overloads

InsetDrawable(Drawable, Int32)

Creates a new inset drawable with the specified inset.

InsetDrawable(Drawable, Single)

Creates a new inset drawable with the specified inset.

InsetDrawable(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

InsetDrawable(Drawable, Int32, Int32, Int32, Int32)

Creates a new inset drawable with the specified insets in pixels.

InsetDrawable(Drawable, Single, Single, Single, Single)

Creates a new inset drawable with the specified insets in fraction of the view bounds.

InsetDrawable(Drawable, Int32)

Creates a new inset drawable with the specified inset.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;I)V", "")]
public InsetDrawable (Android.Graphics.Drawables.Drawable? drawable, int inset);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;I)V", "")>]
new Android.Graphics.Drawables.InsetDrawable : Android.Graphics.Drawables.Drawable * int -> Android.Graphics.Drawables.InsetDrawable

Parameters

drawable
Drawable

The drawable to inset.

inset
Int32

Inset in pixels around the drawable.

Attributes

Remarks

Creates a new inset drawable with the specified inset.

Java documentation for android.graphics.drawable.InsetDrawable.InsetDrawable(android.graphics.drawable.Drawable, int).

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

InsetDrawable(Drawable, Single)

Creates a new inset drawable with the specified inset.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;F)V", "", ApiSince=26)]
public InsetDrawable (Android.Graphics.Drawables.Drawable? drawable, float inset);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;F)V", "", ApiSince=26)>]
new Android.Graphics.Drawables.InsetDrawable : Android.Graphics.Drawables.Drawable * single -> Android.Graphics.Drawables.InsetDrawable

Parameters

drawable
Drawable

The drawable to inset.

inset
Single

Inset in fraction (range: [0, 1)) of the inset content bounds.

Attributes

Remarks

Creates a new inset drawable with the specified inset.

Java documentation for android.graphics.drawable.InsetDrawable.InsetDrawable(android.graphics.drawable.Drawable, float).

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

InsetDrawable(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected InsetDrawable (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Graphics.Drawables.InsetDrawable : nativeint * Android.Runtime.JniHandleOwnership -> Android.Graphics.Drawables.InsetDrawable

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

InsetDrawable(Drawable, Int32, Int32, Int32, Int32)

Creates a new inset drawable with the specified insets in pixels.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;IIII)V", "")]
public InsetDrawable (Android.Graphics.Drawables.Drawable? drawable, int insetLeft, int insetTop, int insetRight, int insetBottom);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;IIII)V", "")>]
new Android.Graphics.Drawables.InsetDrawable : Android.Graphics.Drawables.Drawable * int * int * int * int -> Android.Graphics.Drawables.InsetDrawable

Parameters

drawable
Drawable

The drawable to inset.

insetLeft
Int32

Left inset in pixels.

insetTop
Int32

Top inset in pixels.

insetRight
Int32

Right inset in pixels.

insetBottom
Int32

Bottom inset in pixels.

Attributes

Remarks

Creates a new inset drawable with the specified insets in pixels.

Java documentation for android.graphics.drawable.InsetDrawable.InsetDrawable(android.graphics.drawable.Drawable, int, int, int, int).

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

InsetDrawable(Drawable, Single, Single, Single, Single)

Creates a new inset drawable with the specified insets in fraction of the view bounds.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;FFFF)V", "", ApiSince=26)]
public InsetDrawable (Android.Graphics.Drawables.Drawable? drawable, float insetLeftFraction, float insetTopFraction, float insetRightFraction, float insetBottomFraction);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;FFFF)V", "", ApiSince=26)>]
new Android.Graphics.Drawables.InsetDrawable : Android.Graphics.Drawables.Drawable * single * single * single * single -> Android.Graphics.Drawables.InsetDrawable

Parameters

drawable
Drawable

The drawable to inset.

insetLeftFraction
Single

Left inset in fraction (range: [0, 1)) of the inset content bounds.

insetTopFraction
Single

Top inset in fraction (range: [0, 1)) of the inset content bounds.

insetRightFraction
Single

Right inset in fraction (range: [0, 1)) of the inset content bounds.

insetBottomFraction
Single

Bottom inset in fraction (range: [0, 1)) of the inset content bounds.

Attributes

Remarks

Creates a new inset drawable with the specified insets in fraction of the view bounds.

Java documentation for android.graphics.drawable.InsetDrawable.InsetDrawable(android.graphics.drawable.Drawable, float, float, float, float).

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