Share via


ScaleDrawable Constructors

Definition

Overloads

ScaleDrawable(IntPtr, JniHandleOwnership)

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

ScaleDrawable(Drawable, GravityFlags, Single, Single)

Creates a new scale drawable with the specified gravity and scale properties.

ScaleDrawable(IntPtr, JniHandleOwnership)

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

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

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

ScaleDrawable(Drawable, GravityFlags, Single, Single)

Creates a new scale drawable with the specified gravity and scale properties.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;IFF)V", "")]
public ScaleDrawable (Android.Graphics.Drawables.Drawable? drawable, Android.Views.GravityFlags gravity, float scaleWidth, float scaleHeight);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Drawable;IFF)V", "")>]
new Android.Graphics.Drawables.ScaleDrawable : Android.Graphics.Drawables.Drawable * Android.Views.GravityFlags * single * single -> Android.Graphics.Drawables.ScaleDrawable

Parameters

drawable
Drawable

the drawable to scale

gravity
GravityFlags

gravity constant (see Gravity used to position the scaled drawable within the parent container

scaleWidth
Single

width scaling factor [0...1] to use then the level is at the maximum value, or -1 to not scale width

scaleHeight
Single

height scaling factor [0...1] to use then the level is at the maximum value, or -1 to not scale height

Attributes

Remarks

Creates a new scale drawable with the specified gravity and scale properties.

Java documentation for android.graphics.drawable.ScaleDrawable.ScaleDrawable(android.graphics.drawable.Drawable, int, 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