Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

RoundedBitmapDrawableFactory

public final class RoundedBitmapDrawableFactory
extends Object

java.lang.Object
   ↳ android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory


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

Summary

Public methods

static RoundedBitmapDrawable create(Resources res, String filepath)

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

static RoundedBitmapDrawable create(Resources res, 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(Resources res, InputStream is)

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

Inherited methods

From class java.lang.Object

Public methods

create

added in version 22.1.0
RoundedBitmapDrawable create (Resources res, 
                String filepath)

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

Parameters
res Resources

filepath String

Returns
RoundedBitmapDrawable

create

added in version 22.1.0
RoundedBitmapDrawable create (Resources res, 
                Bitmap bitmap)

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

Parameters
res Resources

bitmap Bitmap

Returns
RoundedBitmapDrawable

create

added in version 22.1.0
RoundedBitmapDrawable create (Resources res, 
                InputStream is)

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

Parameters
res Resources

is InputStream

Returns
RoundedBitmapDrawable