RoundedBitmapDrawableFactory

class RoundedBitmapDrawableFactory
kotlin.Any
   ↳ androidx.core.graphics.drawable.RoundedBitmapDrawableFactory

Constructs RoundedBitmapDrawable objects, either from Bitmaps directly, or from streams and files.

Summary

Public methods

static RoundedBitmapDrawable
create(@NonNull res: Resources, @Nullable bitmap: Bitmap?)

Returns a new drawable by creating it from a bitmap, setting initial target density based on the display metrics of the resources.

static RoundedBitmapDrawable
create(@NonNull res: Resources, @NonNull filepath: String)

Returns a new drawable, creating it by opening a given file path and decoding the bitmap.

static RoundedBitmapDrawable
create(@NonNull res: Resources, @NonNull is: InputStream)

Returns a new drawable, creating it by decoding a bitmap from the given input stream.

Public methods

create

@NonNull static fun create(@NonNull res: Resources, @Nullable bitmap: Bitmap?): RoundedBitmapDrawable

Returns a new drawable by creating it from a bitmap, setting initial target density based on the display metrics of the resources.

create

@NonNull static fun create(@NonNull res: Resources, @NonNull filepath: String): RoundedBitmapDrawable

Returns a new drawable, creating it by opening a given file path and decoding the bitmap.

create

@NonNull static fun create(@NonNull res: Resources, @NonNull is: InputStream): RoundedBitmapDrawable

Returns a new drawable, creating it by decoding a bitmap from the given input stream.