leanback/src/main/java/androidx/leanback/graphics/ColorFilterDimmer.java
public static ColorFilterDimmer createDefault(Context context) {
        TypedArray a = context.obtainStyledAttributes(R.styleable.LeanbackTheme);

        int dimColor = a.getColor(R.styleable.LeanbackTheme_overlayDimMaskColor,
                context.getResources().getColor(R.color.lb_view_dim_mask_color));
        float activeLevel = a.getFraction(R.styleable.LeanbackTheme_overlayDimActiveLevel, 1, 1,
                context.getResources().getFraction(R.fraction.lb_view_active_level, 1, 0));
        float dimmedLevel = a.getFraction(R.styleable.LeanbackTheme_overlayDimDimmedLevel, 1, 1,
                context.getResources().getFraction(R.fraction.lb_view_dimmed_level, 1, 1));
        a.recycle();
        return new ColorFilterDimmer(ColorFilterCache.getColorFilterCache(
                    dimColor), activeLevel, dimmedLevel);
    }
/**
     * Creates a default ColorFilterDimmer. Uses the default color and level for
     * the dimmer.
     *
     * @param context A Context used to retrieve Resources.
     * @return A ColorFilterDimmer with the default dim color and levels.
     */
Creates a default ColorFilterDimmer. Uses the default color and level for
the dimmer.

@param context A Context used to retrieve Resources.
@return A ColorFilterDimmer with the default dim color and levels.
Creates a default ColorFilterDimmer . Uses the default color and level for the dimmer . @param context A Context used to retrieve Resources . @return A ColorFilterDimmer with the default dim color and levels .
public static ColorFilterDimmer createDefault(Context context) {
        TypedArray a = context.obtainStyledAttributes(R.styleable.LeanbackTheme);
        int dimColor = a.getColor(R.styleable.LeanbackTheme_overlayDimMaskColor,
                context.getResources().getColor(R.color.lb_view_dim_mask_color));
        float activeLevel = a.getFraction(R.styleable.LeanbackTheme_overlayDimActiveLevel, 1, 1,
                context.getResources().getFraction(R.fraction.lb_view_active_level, 1, 0));
        float dimmedLevel = a.getFraction(R.styleable.LeanbackTheme_overlayDimDimmedLevel, 1, 1,
                context.getResources().getFraction(R.fraction.lb_view_dimmed_level, 1, 1));
        a.recycle();
        return new ColorFilterDimmer(ColorFilterCache.getColorFilterCache(
                    dimColor), activeLevel, dimmedLevel);
    }
public static ColorFilterDimmer createDefault ( Context context ) { TypedArray a = context . obtainStyledAttributes ( R . styleable . LeanbackTheme ) ; int dimColor = a . getColor ( R . styleable . LeanbackTheme_overlayDimMaskColor , context . getResources ( ) . getColor ( R . color . lb_view_dim_mask_color ) ) ; float activeLevel = a . getFraction ( R . styleable . LeanbackTheme_overlayDimActiveLevel , 1 , 1 , context . getResources ( ) . getFraction ( R . fraction . lb_view_active_level , 1 , 0 ) ) ; float dimmedLevel = a . getFraction ( R . styleable . LeanbackTheme_overlayDimDimmedLevel , 1 , 1 , context . getResources ( ) . getFraction ( R . fraction . lb_view_dimmed_level , 1 , 1 ) ) ; a . recycle ( ) ; return new ColorFilterDimmer ( ColorFilterCache . getColorFilterCache ( dimColor ) , activeLevel , dimmedLevel ) ; }
Creates a default ColorFilterDimmer.
Creates a default ColorFilterDimmer .