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

BrowseRowsFrameLayout

public class BrowseRowsFrameLayout extends android.widget.FrameLayout
Customized FrameLayout excludes margin of child from calculating the child size. So we can change left margin of rows while keep the width of rows unchanged without using hardcoded DIPS.
hide

Fields Summary
Constructors Summary
public BrowseRowsFrameLayout(android.content.Context context)

        this(context ,null);
    
public BrowseRowsFrameLayout(android.content.Context context, android.util.AttributeSet attrs)

        this(context, attrs, 0);
    
public BrowseRowsFrameLayout(android.content.Context context, android.util.AttributeSet attrs, int defStyle)

        super(context, attrs, defStyle);
    
Methods Summary
protected voidmeasureChildWithMargins(android.view.View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed)

        final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
        final int childWidthMeasureSpec = getChildMeasureSpec(parentWidthMeasureSpec,
                getPaddingLeft() + getPaddingRight() + widthUsed, lp.width);
        final int childHeightMeasureSpec = getChildMeasureSpec(parentHeightMeasureSpec,
                getPaddingTop() + getPaddingBottom() + heightUsed, lp.height);
        child.measure(childWidthMeasureSpec, childHeightMeasureSpec);