转载:http://blog.sina.com.cn/s/blog_6e519585010152s5.html
先看下面这张图:
getWidth(): View在设定好布局以后整個View的宽度。
getMeasuredWidth(): 对View的内容进行测量后得到的View內容占据的宽度。
转载:http://blog.sina.com.cn/s/blog_6e519585010152s5.html
先看下面这张图:
getWidth(): View在设定好布局以后整個View的宽度。
getMeasuredWidth(): 对View的内容进行测量后得到的View內容占据的宽度。