added in version 26.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

IconCompat

public class IconCompat
extends Object

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


Helper for accessing features in Icon.

Summary

Public methods

static IconCompat createWithAdaptiveBitmap(Bitmap bits)

Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined by AdaptiveIconDrawable.

static IconCompat createWithBitmap(Bitmap bits)

Create an Icon pointing to a bitmap in memory.

static IconCompat createWithContentUri(String uri)

Create an Icon pointing to an image file specified by URI.

static IconCompat createWithContentUri(Uri uri)

Create an Icon pointing to an image file specified by URI.

static IconCompat createWithData(byte[] data, int offset, int length)

Create an Icon pointing to a compressed bitmap stored in a byte array.

static IconCompat createWithResource(Context context, int resId)

Create an Icon pointing to a drawable resource.

Icon toIcon()

Convert this compat object to Icon object.

Inherited methods

From class java.lang.Object

Public methods

createWithAdaptiveBitmap

added in version 26.1.0
IconCompat createWithAdaptiveBitmap (Bitmap bits)

Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined by AdaptiveIconDrawable.

Parameters
bits Bitmap: A valid Bitmap object

Returns
IconCompat