FileDocCategorySizeDatePackage
RoundedRectHelperApi21.javaAPI DocAndroid 5.1 API2109Thu Mar 12 22:22:56 GMT 2015android.support.v17.leanback.widget

RoundedRectHelperApi21

public class RoundedRectHelperApi21 extends Object

Fields Summary
private static int
sCornerRadius
private static final android.view.ViewOutlineProvider
sOutlineProvider
Constructors Summary
Methods Summary
public static voidclearBackground(android.view.View view)

        view.setBackground(null);
        view.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
        view.setClipToOutline(false);
    
public static voidsetRoundedRectBackground(android.view.View view, int color)


           
        if (color == Color.TRANSPARENT) {
            view.setOutlineProvider(sOutlineProvider);
        } else {
            view.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
            view.setBackgroundResource(R.drawable.lb_rounded_rect_bg);
            ((GradientDrawable) view.getBackground().mutate()).setColor(color);
        }
        view.setClipToOutline(true);