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

RoundedRectHelper

public final class RoundedRectHelper extends Object
Helper for setting rounded rectangle backgrounds on a view.

Fields Summary
private static final RoundedRectHelper
sInstance
private Impl
mImpl
Constructors Summary
private RoundedRectHelper()

        if (Build.VERSION.SDK_INT >= 21) {
            mImpl = new Api21Impl();
        } else {
            mImpl = new StubImpl();
        }
    
Methods Summary
public voidclearBackground(android.view.View view)
Clears the background of the view to transparent.

param
view The view to be modified

        mImpl.clearBackground(view);
    
public static android.support.v17.leanback.widget.RoundedRectHelpergetInstance()
Returns an instance of the helper.


               
        
        return sInstance;
    
public voidsetRoundedRectBackground(android.view.View view, int color)
Sets a rounded rectangle background on the given view, and clips the view to the background. If clipping isn't supported on the android runtime, a simple rectangle background is set instead.

param
view The view to be modified
param
color The color of the background

        mImpl.setRoundedRectBackground(view, color);