IconCompat

Helper for accessing features in android.graphics.drawable.Icon.

Constructors

Link copied to clipboard
constructor()
Used for VersionedParcelable.

Types

Link copied to clipboard
annotation class IconType

Properties

Link copied to clipboard
Link copied to clipboard
open var mInt1: Int
Link copied to clipboard
open var mInt2: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
An icon that was created using createWithAdaptiveBitmap.
Link copied to clipboard
val TYPE_BITMAP: Int = 1
An icon that was created using createWithBitmap.
Link copied to clipboard
val TYPE_DATA: Int = 3
An icon that was created using createWithData.
Link copied to clipboard
An icon that was created using createWithResource.
Link copied to clipboard
val TYPE_UNKNOWN: Int = -1
Value returned when the type of an Icon cannot be determined.
Link copied to clipboard
val TYPE_URI: Int = 4
An icon that was created using createWithContentUri.
Link copied to clipboard
An icon that was created using createWithAdaptiveBitmapContentUri.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Extracts an icon from a bundle that was added using toBundle.
Link copied to clipboard
@RequiresApi(value = 23)
open fun createFromIcon(@NonNull context: Context, @NonNull icon: Icon): IconCompat
Creates an IconCompat from an Icon.
Link copied to clipboard
Creates an IconCompat from an Icon, or returns null if the given Icon is created from resource 0.
Link copied to clipboard
Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined by android.graphics.drawable.AdaptiveIconDrawable.
Link copied to clipboard
Create an Icon pointing to an image file specified by URI.
Link copied to clipboard
Create an Icon pointing to a bitmap in memory.
Link copied to clipboard
Create an Icon pointing to an image file specified by URI.
Link copied to clipboard
open fun createWithData(@NonNull data: Array<Byte>, offset: Int, length: Int): IconCompat
Create an Icon pointing to a compressed bitmap stored in a byte array.
Link copied to clipboard
Create an Icon pointing to a drawable resource.
Link copied to clipboard
Gets the bitmap used to create this icon.
Link copied to clipboard
Gets the drawable resource id used to create this icon.
Link copied to clipboard
Gets the package used to create this icon.
Link copied to clipboard
open fun getType(): Int
Gets the type of the icon provided.
Link copied to clipboard
open fun getUri(): Uri
Gets the uri used to create this icon.
Link copied to clipboard
Create an input stream for bitmap by resolving corresponding content uri.
Link copied to clipboard
Returns a Drawable that can be used to draw the image inside this Icon, constructing it if necessary.
Link copied to clipboard
open fun onPostParceling()
Link copied to clipboard
open fun onPreParceling(isStream: Boolean)
Link copied to clipboard
Store a color to use whenever this Icon is drawn.
Link copied to clipboard
Store a color to use whenever this Icon is drawn.
Link copied to clipboard
Store a blending mode to use whenever this Icon is drawn.
Link copied to clipboard
open fun toBundle(): Bundle
Adds this Icon to a Bundle that can be read back with the same parameters to createFromBundle.
Link copied to clipboard
@RequiresApi(value = 23)
open fun toIcon(): Icon

@RequiresApi(value = 23)
open fun toIcon(@Nullable context: Context): Icon
Convert this compat object to Icon object.
Link copied to clipboard
open fun toString(): String