Icon

Class of android.graphics.drawable · Icon.java · Android's reference

public final class Icon implements android.os.Parcelable

An icon by its source: a bitmap, a resource, a content URI or data. Drawn through a Drawable when loaded.

Fields

public static final int TYPE_BITMAP = 1 source
public static final int TYPE_RESOURCE = 2 source
public static final int TYPE_DATA = 3 source
public static final int TYPE_URI = 4 source
public static final int TYPE_ADAPTIVE_BITMAP = 5 source
public static final int TYPE_URI_ADAPTIVE_BITMAP = 6 source

Methods

public static Icon createWithBitmap(Bitmap bits) source
public static Icon createWithAdaptiveBitmap(Bitmap bits) source
public static Icon createWithResource(Context context, int resId) source
public static Icon createWithResource(String resPackage, int resId) source
public static Icon createWithData(byte[] data, int offset, int length) source
public static Icon createWithContentUri(String uri) source
public static Icon createWithContentUri(Uri uri) source
public static Icon createWithAdaptiveBitmapContentUri(Uri uri) source
public int getType() source
public int getResId() source
public String getResPackage() source
public Uri getUri() source
public Icon setTint(int tint) source
public Icon setTintList(ColorStateList tintList) source
public Icon setTintMode(PorterDuff.Mode mode) source
public Drawable loadDrawable(Context context) source

The icon's drawable: its bitmap, or its resource's drawable

public String toString() source
public int describeContents() source
public void writeToParcel(android.os.Parcel dest, int flags) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.