@Test public void testGetFont_xmlFileIsCached() { Typeface font = ResourcesCompat.getFont(mContext, R.font.samplexmlfont); Typeface font2 = ResourcesCompat.getFont(mContext, R.font.samplexmlfont); assertSame(font, font2); }
@Nullable public static Typeface getFont(@NonNull Context context, @FontRes int id) throws NotFoundException { if (context.isRestricted()) { return null; } return loadFont(context, id, new TypedValue(), Typeface.NORMAL, null , null , false ); }
ResourcesCompat { @Nullable public static Typeface getFont(@NonNull Context context, @FontRes int id) throws NotFoundException { if (context.isRestricted()) { return null; } return loadFont(context, id, new TypedValue(), Typeface.NORMAL, null , null , false ); } }
ResourcesCompat { @Nullable public static Typeface getFont(@NonNull Context context, @FontRes int id) throws NotFoundException { if (context.isRestricted()) { return null; } return loadFont(context, id, new TypedValue(), Typeface.NORMAL, null , null , false ); } private  ResourcesCompat(); }
ResourcesCompat { @Nullable public static Typeface getFont(@NonNull Context context, @FontRes int id) throws NotFoundException { if (context.isRestricted()) { return null; } return loadFont(context, id, new TypedValue(), Typeface.NORMAL, null , null , false ); } private  ResourcesCompat(); @Nullable @SuppressWarnings("deprecation") static Drawable getDrawable(@NonNull Resources res, @DrawableRes int id,
            @Nullable Theme theme); @Nullable @SuppressWarnings("deprecation") static Drawable getDrawableForDensity(@NonNull Resources res, @DrawableRes int id,
            int density, @Nullable Theme theme); @ColorInt @SuppressWarnings("deprecation") static int getColor(@NonNull Resources res, @ColorRes int id, @Nullable Theme theme); @Nullable @SuppressWarnings("deprecation") static ColorStateList getColorStateList(@NonNull Resources res, @ColorRes int id,
            @Nullable Theme theme); @Nullable static Typeface getFont(@NonNull Context context, @FontRes int id); static void getFont(@NonNull Context context, @FontRes int id,
            @NonNull FontCallback fontCallback, @Nullable Handler handler); @RestrictTo(LIBRARY_GROUP) static Typeface getFont(@NonNull Context context, @FontRes int id, TypedValue value,
            int style, @Nullable FontCallback fontCallback); }
ResourcesCompat { @Nullable public static Typeface getFont(@NonNull Context context, @FontRes int id) throws NotFoundException { if (context.isRestricted()) { return null; } return loadFont(context, id, new TypedValue(), Typeface.NORMAL, null , null , false ); } private  ResourcesCompat(); @Nullable @SuppressWarnings("deprecation") static Drawable getDrawable(@NonNull Resources res, @DrawableRes int id,
            @Nullable Theme theme); @Nullable @SuppressWarnings("deprecation") static Drawable getDrawableForDensity(@NonNull Resources res, @DrawableRes int id,
            int density, @Nullable Theme theme); @ColorInt @SuppressWarnings("deprecation") static int getColor(@NonNull Resources res, @ColorRes int id, @Nullable Theme theme); @Nullable @SuppressWarnings("deprecation") static ColorStateList getColorStateList(@NonNull Resources res, @ColorRes int id,
            @Nullable Theme theme); @Nullable static Typeface getFont(@NonNull Context context, @FontRes int id); static void getFont(@NonNull Context context, @FontRes int id,
            @NonNull FontCallback fontCallback, @Nullable Handler handler); @RestrictTo(LIBRARY_GROUP) static Typeface getFont(@NonNull Context context, @FontRes int id, TypedValue value,
            int style, @Nullable FontCallback fontCallback);  }