当前位置: 代码迷 >> Android >> 无法理解的onMeasure(int widthMeasureSpec, int heightMeasureSpec),该如何解决
  详细解决方案

无法理解的onMeasure(int widthMeasureSpec, int heightMeasureSpec),该如何解决

热度:38   发布时间:2016-05-01 22:10:58.0
无法理解的onMeasure(int widthMeasureSpec, int heightMeasureSpec)
自己继承ViewGroup实现一个视图。重写protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
发现执行该函数时widthMeasureSpec值为1073742304,heightMeasureSpec值为-2147482923。

这两个值是什么意思?

谢谢。

------解决方案--------------------
恭喜楼主解决问题