| | |
| | | import com.demo.lib.common.util.ui.LoadingDialogUtil; |
| | | import com.demo.library_ad.AdUtil; |
| | | import com.demo.library_ad.RewardAdUtil; |
| | | import com.demo.library_flutter.utils.FlutterPageUtil; |
| | | import com.yeshi.makemoney.video.R; |
| | | import com.yeshi.makemoney.video.app.entity.goldcorn.GoldCornTaskInfo; |
| | | import com.yeshi.makemoney.video.app.ui.dialog.GoldCornDoubleDialog; |
| | |
| | | import com.yeshi.makemoney.video.app.utils.UserUtil; |
| | | import com.yeshi.makemoney.video.app.utils.api.BasicTextHttpResponseHandler; |
| | | import com.yeshi.makemoney.video.app.utils.api.HttpApiUtil; |
| | | import com.yeshi.makemoney.video.app.utils.ui.JumpPageUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | |
| | | } |
| | | }); |
| | | |
| | | |
| | | mAquery.id(R.id.ll_double).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (mAquery.id(R.id.fl_double_btn).getView().getVisibility() != View.VISIBLE) { |
| | | Toast.makeText(mContext, "未加倍金币,会自动入账。", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | }); |
| | | //加倍领取金币先消失 |
| | | mAquery.id(R.id.fl_double_btn).visibility(View.GONE); |
| | | mAquery.id(R.id.fl_double_btn).clicked(new View.OnClickListener() { |
| | |
| | | DialogUtil.dismiss(mDialog); |
| | | } |
| | | |
| | | if (!UserUtil.isLogin(mContext)) { |
| | | //去登录 |
| | | FlutterPageUtil.jumpPage("LoginPage", null, null); |
| | | return; |
| | | } |
| | | |
| | | if (VideoGoldCornUtil.isDoubleNotify(mContext)) { |
| | | startDoubleTask(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | //TODO 弹框 |
| | | mDialog = new GoldCornDoubleDialog.Builder(mActivity).setGoldCorn(VideoGoldCornUtil.getVideoPlayCircle(mContext) * VideoGoldCornUtil.getPrice(mContext)).setCallBack(new GoldCornDoubleDialog.GoldCornDoubleCallBack() { |
| | | @Override |
| | | public void onPositive(boolean notify) { |
| | |
| | | if (info.isFinish()) { |
| | | //任务完成后要隐藏覆盖物 |
| | | mAquery.id(R.id.fl_cover).visibility(View.GONE); |
| | | Toast.makeText(mContext, "任务完成", Toast.LENGTH_LONG).show(); |
| | | } else { |
| | | mAquery.id(R.id.fl_cover).visibility(View.VISIBLE); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }); |
| | |
| | | * 开始加倍任务 |
| | | */ |
| | | private void startDoubleTask() { |
| | | if (!UserUtil.isLogin(mContext)) { |
| | | //去登录 |
| | | FlutterPageUtil.jumpPage("LoginPage", null, null); |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (reward) { |
| | | uploadData(true); |
| | | return; |