getWidth() 跟 getMeasuredWidth()的区别

getWidth() 和 getMeasuredWidth()的区别
   getWidth(): View在设定好布局后整个View的宽度。
  getMeasuredWidth(): 对View上的内容进行测量后得到的View内容占据的宽度,前提是你必须在父布局的onLayout()方法或者此View的onDraw()方法里调用measure(0,0);(measure 参数的值你可以自己定义),否则你得到的结果和getWidth()得到的结果一样