为了账号安全,请及时绑定邮箱和手机立即绑定

int iconwidth = Math.min()这句怎么会包空指针啊

http://img1.sycdn.imooc.com//55b766f000012baf13800711.jpg

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)

{

super.onMeasure(widthMeasureSpec, heightMeasureSpec);

int iconwidth = Math.min(getMeasuredWidth() - getPaddingLeft()

, getMeasuredHeight() - getPaddingTop()

- getPaddingBottom() - mTextBound.height());

int left=getMeasuredWidth()/2-iconwidth/2;

int top=getMeasuredHeight()/2-(mTextBound.height() + iconwidth)/2;

mIconRect=new Rect(left,top,left+iconwidth,top+iconwidth);

}

可是我的代码没有错啊

正在回答

1 回答

已解决

0 回复 有任何疑惑可以回复我~
#1

valkylrie

怎么解决的?
2015-09-21 回复 有任何疑惑可以回复我~
#2

龙宝宝龙

怎么解决的 ?
2015-11-24 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
微信6.0主界面
  • 参与学习       58953    人
  • 解答问题       174    个

本课程将讲解微信6.0主界面的实现方法,微信5.2.1后续课程

进入课程

int iconwidth = Math.min()这句怎么会包空指针啊

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信