IconCompat
open class IconCompat : CustomVersionedParcelable
androidx.core.graphics.drawable.IconCompat |
Helper for accessing features in android.graphics.drawable.Icon
.
Summary
Constants | |
---|---|
static Int |
An icon that was created using |
static Int |
An icon that was created using |
static Int |
An icon that was created using |
static Int |
An icon that was created using #createWithResource. |
static Int |
Value returned when the type of an |
static Int |
An icon that was created using #createWithContentUri. |
static Int |
An icon that was created using #createWithAdaptiveBitmapContentUri. |
Public methods | |
---|---|
open static IconCompat? |
createFromBundle(@NonNull bundle: Bundle) Extracts an icon from a bundle that was added using |
open static IconCompat? |
createFromIcon(@NonNull context: Context, @NonNull icon: Icon) Creates an IconCompat from an Icon. |
open static IconCompat! |
createWithAdaptiveBitmap(bits: Bitmap!) Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined by |
open static IconCompat |
createWithAdaptiveBitmapContentUri(@NonNull uri: String) Create an Icon pointing to an image file specified by URI. |
open static IconCompat |
createWithAdaptiveBitmapContentUri(@NonNull uri: Uri) Create an Icon pointing to an image file specified by URI. |
open static IconCompat! |
createWithBitmap(bits: Bitmap!) Create an Icon pointing to a bitmap in memory. |
open static IconCompat! |
createWithContentUri(uri: String!) Create an Icon pointing to an image file specified by URI. |
open static IconCompat! |
createWithContentUri(uri: Uri!) Create an Icon pointing to an image file specified by URI. |
open static IconCompat! |
createWithData(data: ByteArray!, offset: Int, length: Int) Create an Icon pointing to a compressed bitmap stored in a byte array. |
open static IconCompat! |
createWithResource(context: Context!, @DrawableRes resId: Int) Create an Icon pointing to a drawable resource. |
open Int |
getResId() Gets the resource id used to create this icon. |
open String |
Gets the package used to create this icon. |
open Int |
getType() Gets the type of the icon provided. |
open Uri |
getUri() Gets the uri used to create this icon. |
open Drawable? |
loadDrawable(@NonNull context: Context) Returns a Drawable that can be used to draw the image inside this Icon, constructing it if necessary. |
open Unit | |
open Unit |
onPreParceling(isStream: Boolean) |
open IconCompat! |
Store a color to use whenever this Icon is drawn. |
open IconCompat! |
setTintList(tintList: ColorStateList!) Store a color to use whenever this Icon is drawn. |
open IconCompat! |
setTintMode(mode: Mode!) Store a blending mode to use whenever this Icon is drawn. |
open Bundle |
toBundle() Adds this Icon to a Bundle that can be read back with the same parameters to |
open Icon |
toIcon() |
open Icon |
Convert this compat object to |
open String |
toString() |