Class DrawableDecoderCompat

java.lang.Object
com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat

public final class DrawableDecoderCompat extends Object
Handles decoding Drawables with the v7 support library if present and falling back to the v4 support library otherwise.
  • Method Details

    • getDrawable

      public static Drawable getDrawable(Context ourContext, Context targetContext, @DrawableRes int id)
      See getDrawable(Context, int, Theme).
    • getDrawable

      public static Drawable getDrawable(Context ourContext, @DrawableRes int id, @Nullable Resources.Theme theme)
      Loads a Drawable using AppCompatResources if available and ResourcesCompat otherwise, depending on whether or not the v7 support library is included in the application.
      Parameters:
      theme - Used instead of the Resources.Theme returned from the given Context if non-null when loading the Drawable.