RoundedBitmapDrawableFactory

Added in 1.1.0

public final class RoundedBitmapDrawableFactory


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

Summary

Public methods

static @NonNull RoundedBitmapDrawable

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

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

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

static @NonNull RoundedBitmapDrawable

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

Public methods

create

Added in 1.1.0
public static @NonNull RoundedBitmapDrawable create(@NonNull Resources res, @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.

create

Added in 1.1.0
public static @NonNull RoundedBitmapDrawable create(@NonNull Resources res, @NonNull String filepath)

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

create

Added in 1.1.0
public static @NonNull RoundedBitmapDrawable create(@NonNull Resources res, @NonNull InputStream is)

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