@SuppressLint("NewApi") @Nullable public static Drawable inflate(boolean forceSystemHandlingWhenPossible,@NonNull Resources resources,@DrawableRes int id){
  boolean systemHandling=isSystemHandling(forceSystemHandlingWhenPossible);
  Log.d(LOG_TAG,String.format("Inflating resource with id #0x%s (system handling: %s)",Integer.toHexString(id),systemHandling));
  if (systemHandling) {
    return resources.getDrawable(id,null);
  }
  try {
    return VectorDrawable.create(resources,id);
  }
 catch (  Resources.NotFoundException e) {
    return null;
  }
}

@ SuppressLint ( "NewApi" ) @ Nullable public static Drawable inflate ( boolean forceSystemHandlingWhenPossible , @ NonNull Resources resources , @ DrawableRes int id ) { boolean systemHandling = isSystemHandling ( forceSystemHandlingWhenPossible ) ; Log . d ( LOG_TAG , String . format ( "Inflating resource with id #0x%s (system handling: %s)" , Integer . toHexString ( id ) , systemHandling ) ) ; if ( systemHandling ) { return resources . getDrawable ( id , null ) ; } try { return VectorDrawable . create ( resources , id ) ; } catch ( Resources . NotFoundException e ) { return null ; } }
inflate a drawable from a vector xml resource .
