FileDocCategorySizeDatePackage
MediaRouterThemeHelper.javaAPI DocAndroid 5.1 API1846Thu Mar 12 22:22:56 GMT 2015android.support.v7.app

MediaRouterThemeHelper

public final class MediaRouterThemeHelper extends Object

Fields Summary
Constructors Summary
private MediaRouterThemeHelper()

    
Methods Summary
public static android.content.ContextcreateThemedContext(android.content.Context context)

        boolean isLightTheme = isLightTheme(context);
        return new ContextThemeWrapper(context, isLightTheme ?
                R.style.Theme_MediaRouter_Light : R.style.Theme_MediaRouter);
    
public static android.graphics.drawable.DrawablegetThemeDrawable(android.content.Context context, int attr)

        int res = getThemeResource(context, attr);
        return res != 0 ? context.getResources().getDrawable(res) : null;
    
public static intgetThemeResource(android.content.Context context, int attr)

        TypedValue value = new TypedValue();
        return context.getTheme().resolveAttribute(attr, value, true) ? value.resourceId : 0;
    
private static booleanisLightTheme(android.content.Context context)

        TypedValue value = new TypedValue();
        return context.getTheme().resolveAttribute(R.attr.isLightTheme, value, true)
                && value.data != 0;