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

拼图游戏不能显示拼图成功,求大神解答

拼图游戏不能显示拼图成功,求大神解答

慕粉3911145 2016-09-04 10:28:16
//判断用户是否完成拼图 checkSuccess(); isAniming=false; } }); } //判断用户是否完成拼图 private void checkSuccess() { boolean isSuccess=true; for (int i = 0; i < mGamePintuItems.length; i++) { ImageView imageView=mGamePintuItems[i]; if (getImageIndexByTag((String)imageView.getTag())!=i) { isSuccess=false; }      } if (isSuccess) { Log.e("TAG","SUCCESS"); Toast.makeText(getContext(), "Success,Level  up!!!",  Toast.LENGTH_LONG).show();   } } private int getImageIndexByTag(String tag) { // TODO Auto-generated method stub return 0; } /* *  * 根据Tag获取ID */ public int getImageIdByTag(String tag) { String[] split=tag.split("_"); return Integer.parseInt(split[0]); } public int getImageIndex(String tag){ String[] split=tag.split("_"); return Integer.parseInt(split[1]); } /* * 构造我们的动画层 */ private void setUpAnimLayout() { if (mAnimLayout==null) { mAnimLayout=new RelativeLayout(getContext()); addView(mAnimLayout); } }}
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 1763 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号