if (lp.width > 0)
          childLeft += (int) ((mWidth - lp.width) / 2.0);
        else
          childLeft += (int) ((mWidth - child.getMeasuredWidth()) / 2.0);