@Override
 protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
   mPercentLayoutHelper.adjustChildren(widthMeasureSpec, heightMeasureSpec);
   super.onMeasure(widthMeasureSpec, heightMeasureSpec);
   if (mPercentLayoutHelper.handleMeasuredStateTooSmall()) {
     super.onMeasure(widthMeasureSpec, heightMeasureSpec);
   }
 }
 @Override
 protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) {
   PercentLayoutHelper.fetchWidthAndHeight(this, a, widthAttr, heightAttr);
 }
 public LayoutParams(Context c, AttributeSet attrs) {
   super(c, attrs);
   mPercentLayoutInfo = PercentLayoutHelper.getPercentLayoutInfo(c, attrs);
 }
 @Override
 protected void onLayout(boolean changed, int l, int t, int r, int b) {
   super.onLayout(changed, l, t, r, b);
   mPercentLayoutHelper.restoreOriginalParams();
 }