在activity_main中已经设置了居中,那么用直径/2不是也可以确定中心位置吗?为什么一定要用“屏宽”/2呢?
int width=Math.min(getMeasuredWidth(),getMeasuredHeight());
mPadding=getPaddingLeft();
mRadius=width-2*mPadding;
mCenter=width/2;
int width=Math.min(getMeasuredWidth(),getMeasuredHeight());
mPadding=getPaddingLeft();
mRadius=width-2*mPadding;
mCenter=width/2;
2016-04-13
举报