Adjacent Files

Project Info

. > library > src > main > java > james > adaptiveicon > AdaptiveIcon.java

AdaptiveIcon

Type: public

Parameter Name Description
fgDrawable the foreground drawable
bgDrawable the background drawable, or null if the foreground drawable should not be clipped
scale the scale to apply to the clipped drawables (assuming that bgDrawable is not null)

AdaptiveIcon

Type: public

Parameter Name Description
fgBitmap the foreground bitmap
bgBitmap the background bitmap, or null if the foreground bitmap should not be clipped
scale the scale to apply to the clipped bitmaps (assuming that bgBitmap is not null)

getFgDrawable

Type: public Drawable

Parameter Name Description
context an active context

Returned Value: the foreground drawable of the icon

getBgDrawable

Type: @Nullable public Drawable

Parameter Name Description
context an active context

Returned Value: the background drawable of the icon, or null if the foreground should not be clipped

getFgBitmap

Type: public Bitmap

Returned Value: the foreground bitmap of the icon

getBgBitmap

Type: @Nullable public Bitmap

Returned Value: the background bitmap of the icon, or null if the foreground should not be clipped

recycle

Type: public void

Recycles the bitmaps used in this icon

with

Type: public Loader

Parameter Name Description
context the active context for the loader to use

Returned Value: the loader, for method chaining

fallback

Type: public Loader

Sets a fallback for the loader to use if an adaptive icon cannot be obtained.

Parameter Name Description
fallback the fallback to use

Returned Value: the loader, for method chaining

load

Type: @Nullable public AdaptiveIcon

Loads an adaptive icon.

Parameter Name Description
info the app to load the icon for

Returned Value: the adaptive icon, or null if it cannot be obtained

loadAsync

Type: public Thread

Crappy async implementation

Parameter Name Description
info the app to load the icon for
callback an interface to pass the adaptive icon to, or null if it cannot be obtained

Returned Value: the started thread

withBackgroundColor

Type: public RoundIconFallback

Parameter Name Description
backgroundColor the color of the background, as a color int

Returned Value: the current RoundIconFallback, for method chaining

withBackground

Type: public RoundIconFallback

Parameter Name Description
background the drawable to use as the background, or null to find a color automatically

Returned Value: the current RoundIconFallback, for method chaining

withScale

Type: public RoundIconFallback

Parameter Name Description
scale the scale of the legacy icon, preferably between 1 and 2, but other values greater than 0 work also

Returned Value: the current RoundIconFallback, for method chaining

shouldRemoveShadow

Type: public RoundIconFallback

Parameter Name Description
removeShadow whether the shadow (or any other transparent parts) should be removed from the icon

Returned Value: the current RoundIconFallback, for method chaining

withBackgroundColor

Type: public LegacyIconFallback

Parameter Name Description
backgroundColor the color of the background, as a color int

Returned Value: the current LegacyIconFallback, for method chaining

withBackground

Type: public LegacyIconFallback

Parameter Name Description
background the drawable to use as the background, or null to find a color automatically

Returned Value: the current LegacyIconFallback, for method chaining

shouldClip

Type: public LegacyIconFallback

Parameter Name Description
shouldClip whether legacy icons should be clipped by the adaptive icon shape, or null to determine this automatically

Returned Value: the current LegacyIconFallback, for method chaining

withScale

Type: public LegacyIconFallback

Parameter Name Description
scale the scale of the legacy icon, preferably between 1 and 2, but other values greater than 0 work also

Returned Value: the current LegacyIconFallback, for method chaining

shouldRemoveShadow

Type: public LegacyIconFallback

Parameter Name Description
removeShadow whether the shadow (or any other transparent parts) should be removed from the icon

Returned Value: the current LegacyIconFallback, for method chaining

withFallback

Type: public final Fallback

This method sets a fallback for this fallback to use if it fails to obtain an acceptable AdaptiveIcon.

Parameter Name Description
fallback the fallback to use if this one fails

Returned Value: the current Fallback, for method chaining

load

Type: @Nullable public abstract AdaptiveIcon

Loads the adaptive icon for this fallback, or null if it cannot be obtained by this fallback or the fallback specified by the ‘withFallback’ function.

Parameter Name Description
context the active context
info the application to get the icon from

Returned Value: the adaptive icon for this fallback, or null if it cannot be obtained

This site may do shady things with cookies and stuff because it's evil. Please don't read my privacy policy. close