BitmapDrawable Constructors

Definition

Overloads

BitmapDrawable()
Obsolete.

Create an empty drawable, not dealing with density.

BitmapDrawable(Resources)
Obsolete.

Create an empty drawable, setting initial target density based on the display metrics of the resources.

BitmapDrawable(Bitmap)
Obsolete.

Create drawable from a bitmap, not dealing with density.

BitmapDrawable(Stream)
Obsolete.

Create a drawable by decoding a bitmap from the given input stream.

BitmapDrawable(String)
Obsolete.

Create a drawable by opening a given file path and decoding the bitmap.

BitmapDrawable(Resources, Bitmap)

Create drawable from a bitmap, setting initial target density based on the display metrics of the resources.

BitmapDrawable(Resources, Stream)

Create a drawable by decoding a bitmap from the given input stream.

BitmapDrawable(Resources, String)

Create a drawable by opening a given file path and decoding the bitmap.

BitmapDrawable(IntPtr, JniHandleOwnership)

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

BitmapDrawable()

Caution

deprecated

Create an empty drawable, not dealing with density.

[Android.Runtime.Register(".ctor", "()V", "")]
[System.Obsolete("deprecated")]
public BitmapDrawable ();
Attributes

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

BitmapDrawable(Resources)

Caution

deprecated

Create an empty drawable, setting initial target density based on the display metrics of the resources.

[Android.Runtime.Register(".ctor", "(Landroid/content/res/Resources;)V", "", ApiSince=4)]
[System.Obsolete("deprecated")]
public BitmapDrawable (Android.Content.Res.Resources res);
new Android.Graphics.Drawables.BitmapDrawable : Android.Content.Res.Resources -> Android.Graphics.Drawables.BitmapDrawable

Parameters

res
Resources
Attributes

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

BitmapDrawable(Bitmap)

Caution

deprecated

Create drawable from a bitmap, not dealing with density.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/Bitmap;)V", "")]
[System.Obsolete("deprecated")]
public BitmapDrawable (Android.Graphics.Bitmap bitmap);
new Android.Graphics.Drawables.BitmapDrawable : Android.Graphics.Bitmap -> Android.Graphics.Drawables.BitmapDrawable

Parameters

bitmap
Bitmap
Attributes

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

BitmapDrawable(Stream)

Caution

deprecated

Create a drawable by decoding a bitmap from the given input stream.

[Android.Runtime.Register(".ctor", "(Ljava/io/InputStream;)V", "")]
[System.Obsolete("deprecated")]
public BitmapDrawable (System.IO.Stream is);
new Android.Graphics.Drawables.BitmapDrawable : System.IO.Stream -> Android.Graphics.Drawables.BitmapDrawable

Parameters

is
Stream
Attributes

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

BitmapDrawable(String)

Caution

deprecated

Create a drawable by opening a given file path and decoding the bitmap.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
[System.Obsolete("deprecated")]
public BitmapDrawable (string filepath);
new Android.Graphics.Drawables.BitmapDrawable : string -> Android.Graphics.Drawables.BitmapDrawable

Parameters

filepath
String
Attributes

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

BitmapDrawable(Resources, Bitmap)

Create drawable from a bitmap, setting initial target density based on the display metrics of the resources.

[Android.Runtime.Register(".ctor", "(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V", "", ApiSince=4)]
public BitmapDrawable (Android.Content.Res.Resources res, Android.Graphics.Bitmap bitmap);
new Android.Graphics.Drawables.BitmapDrawable : Android.Content.Res.Resources * Android.Graphics.Bitmap -> Android.Graphics.Drawables.BitmapDrawable

Parameters

res
Resources
bitmap
Bitmap
Attributes

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

BitmapDrawable(Resources, Stream)

Create a drawable by decoding a bitmap from the given input stream.

[Android.Runtime.Register(".ctor", "(Landroid/content/res/Resources;Ljava/io/InputStream;)V", "", ApiSince=5)]
public BitmapDrawable (Android.Content.Res.Resources res, System.IO.Stream is);
new Android.Graphics.Drawables.BitmapDrawable : Android.Content.Res.Resources * System.IO.Stream -> Android.Graphics.Drawables.BitmapDrawable

Parameters

res
Resources
is
Stream
Attributes

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

BitmapDrawable(Resources, String)

Create a drawable by opening a given file path and decoding the bitmap.

[Android.Runtime.Register(".ctor", "(Landroid/content/res/Resources;Ljava/lang/String;)V", "", ApiSince=5)]
public BitmapDrawable (Android.Content.Res.Resources res, string filepath);
new Android.Graphics.Drawables.BitmapDrawable : Android.Content.Res.Resources * string -> Android.Graphics.Drawables.BitmapDrawable

Parameters

res
Resources
filepath
String
Attributes

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

BitmapDrawable(IntPtr, JniHandleOwnership)

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

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

Parameters

javaReference
IntPtr

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