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

int pieceWidth = (int)(mlineHeight * ratioPieceofLineHeight);

int pieceWidth = (int)(mlineHeight * ratioPieceofLineHeight);
mWhitePiece = Bitmap.createScaledBitmap(mWhitePiece,pieceWidth,pieceWidth,false);
mBlackPiece = Bitmap.createScaledBitmap(mBlackPiece,pieceWidth,pieceWidth,false);

加了这几句代码,就运行不了了

正在回答

1 回答

这个不能放在init里面  因为这个时候onSizeChanged()还没执行也就是还没得到 整个View的宽高

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

qq_活到老学到老_1 提问者

非常感谢!
2016-10-17 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Android-五子连珠
  • 参与学习       39012    人
  • 解答问题       166    个

Android游戏开发-五子连珠,本教程通过UI与逻辑实现双人对战

进入课程

int pieceWidth = (int)(mlineHeight * ratioPieceofLineHeight);

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