Commit e01ee605 authored by mengcuiguang's avatar mengcuiguang

添加钻石提现功能

parent 198a1d0f
......@@ -10,8 +10,8 @@ android {
applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 7
versionName "1.0.6"
versionCode 8
versionName "1.0.7"
flavorDimensions "default"
// dex突破65535的限制
......@@ -309,6 +309,15 @@ dependencies {
exclude group: 'com.google.code.gson'
}
// 珊瑚广告
// implementation(name:'adapt-1.3.3', ext:'aar')
// implementation(name:'commonbase-1.0.2', ext:'aar')
// implementation(name:'discovery-2.0.12', ext:'aar')
// implementation(name:'shanhuAD-1.0.14', ext:'aar')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
......
......@@ -6,7 +6,6 @@ import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.RequiresApi;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;
import android.support.v4.content.LocalBroadcastManager;
......@@ -178,31 +177,31 @@ public class MintsApplication extends MultiDexApplication {
// 一览视频
initYL();
// // 鱼丸盒子
// if (UserManager.getInstance().userIsLogin()) {
// if (Build.VERSION.SDK_INT > 28) {
//
// // android10 延迟加载 因为获取不到oaid
// RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
// @Override
// public void doInIOThread() {
// try {
// Thread.sleep(1500);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// }
//
// @Override
// public void doInUIThread() {
// initYwSdk();
// }
// });
//
// } else {
// initYwSdk();
// }
// }
// 鱼丸盒子
if (UserManager.getInstance().userIsLogin()) {
if (Build.VERSION.SDK_INT > 28) {
// android10 延迟加载 因为获取不到oaid
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
try {
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
@Override
public void doInUIThread() {
initYwSdk();
}
});
} else {
initYwSdk();
}
}
// 推啊广告
initTuia();
......
......@@ -27,7 +27,20 @@ public class DrawcashBean implements Serializable {
private int coinRate;
private String alipayAccount;
private int coin;
private int diamonds;
private int vedioCompleteSum;
private int vedioNeedSum;
private double firstValue;
private List<CashOutMoneyArrBean> cashOutMoneyArr;
private List<CashOutMoneyArrBean> cashOutDiamondsArr;
public int getDiamonds() {
return diamonds;
}
public void setDiamonds(int diamonds) {
this.diamonds = diamonds;
}
public String getMsg() {
return msg;
......@@ -109,6 +122,38 @@ public class DrawcashBean implements Serializable {
this.cashOutMoneyArr = cashOutMoneyArr;
}
public int getVedioCompleteSum() {
return vedioCompleteSum;
}
public void setVedioCompleteSum(int vedioCompleteSum) {
this.vedioCompleteSum = vedioCompleteSum;
}
public int getVedioNeedSum() {
return vedioNeedSum;
}
public void setVedioNeedSum(int vedioNeedSum) {
this.vedioNeedSum = vedioNeedSum;
}
public double getFirstValue() {
return firstValue;
}
public void setFirstValue(double firstValue) {
this.firstValue = firstValue;
}
public List<CashOutMoneyArrBean> getCashOutDiamondsArr() {
return cashOutDiamondsArr;
}
public void setCashOutDiamondsArr(List<CashOutMoneyArrBean> cashOutDiamondsArr) {
this.cashOutDiamondsArr = cashOutDiamondsArr;
}
public class CashOutMoneyArrBean implements Serializable{
/**
* money : 1
......@@ -120,7 +165,7 @@ public class DrawcashBean implements Serializable {
* canCashOut : false
*/
private double money;
private int money;
private boolean canUseOnce;//还有没有新人专享的机会
private int needFs;//需要多少朋友才能提现
private int nowFriends;//现在有多少了
......@@ -128,11 +173,11 @@ public class DrawcashBean implements Serializable {
private boolean once;//是否是新人专享
private boolean canCashOut;//最终能不能提现
public double getMoney() {
public int getMoney() {
return money;
}
public void setMoney(double money) {
public void setMoney(int money) {
this.money = money;
}
......
......@@ -33,6 +33,7 @@ public class GameBean implements Serializable {
private int status; // 0-未完成挑战,不可点击领取 1-已完成挑战可以领取 2-已领取不可再领取
private int coin;
private int time;
private int rewardType;//0-金币
private int hotType;// 0-不显示 1-显示hot 2-显示new;
private String buttonText;
......@@ -107,5 +108,13 @@ public class GameBean implements Serializable {
public void setTime(int time) {
this.time = time;
}
public int getRewardType() {
return rewardType;
}
public void setRewardType(int rewardType) {
this.rewardType = rewardType;
}
}
}
......@@ -55,6 +55,7 @@ public class GoldRecordBean implements Serializable {
private String day;
private boolean showDay;
private int oldCoin;
private int rewardType;
private int unitCoin;
private int newCoin;
private int detailType;
......@@ -132,5 +133,13 @@ public class GoldRecordBean implements Serializable {
public void setShowDay(boolean showDay) {
this.showDay = showDay;
}
public int getRewardType() {
return rewardType;
}
public void setRewardType(int rewardType) {
this.rewardType = rewardType;
}
}
}
......@@ -229,12 +229,7 @@ public class LoanPresenter extends BasePresenter<LoanView> {
private void getGameList() {
HashMap<String, Object> vo = new HashMap<>();
// if (Build.VERSION.SDK_INT <= 28) {
// vo.put("isShowYwhzGame", true);
// } else {
// vo.put("isShowYwhzGame", false);
// }
vo.put("isShowYwhzGame", false);
vo.put("isShowYwhzGame", true);
AppHttpManager.getInstance(loanApplication)
.call(loanService.getGameList(vo),
......
......@@ -120,7 +120,7 @@ public class MyPresenter extends BasePresenter<MyView> {
// } else {
// vo.put("isShowYwhzGame", false);
// }
vo.put("isShowYwhzGame", false);
vo.put("isShowYwhzGame", true);
AppHttpManager.getInstance(loanApplication)
.call(loanService.myHotActivity(vo),
new BaseSubscriber<BaseResponse<BannerBean>>() {
......
......@@ -488,7 +488,7 @@ public interface LoanService {
// if (BuildConfig.DEBUG) {
// SPUtil spUtil = SPUtil.getInstance(context);
// if (TextUtils.isEmpty(spUtil.getString(Constant.LOCAL_IP))) {
// spUtil.putString(Constant.LOCAL_IP, "http://39.106.5.102:9082/api-p1/");
// spUtil.putString(Constant.LOCAL_IP, "http://39.97.65.143:9082/api-p1/");
// }
// retrofit = new Retrofit.Builder()
// .client(builder.build())
......
......@@ -45,6 +45,7 @@ import com.mints.highgold.utils.SpanUtils;
import com.mints.highgold.utils.Utils;
import com.mints.highgold.utils.rxutil.CommonRxTask;
import com.mints.highgold.utils.rxutil.RxjavaUtil;
import com.mints.library.utils.GlideUtils;
import com.mints.library.utils.json.JsonUtil;
import com.mints.library.utils.nodoubleclick.AntiShake;
import com.qq.e.ads.rewardvideo.RewardVideoAD;
......@@ -156,7 +157,8 @@ public class AwardActivity extends BaseActivity implements AwardView {
} else {
ivBanner.setVisibility(View.VISIBLE);
fsvAward.setVisibility(View.GONE);
ivBanner.setImageResource(R.mipmap.ic_award_banner);
GlideUtils.loadImageViewGif(getContext(), R.drawable.bg_banner, ivBanner);
AppConfig.bannerAdType = 0;
}
}
......@@ -668,13 +670,16 @@ public class AwardActivity extends BaseActivity implements AwardView {
tvAwardContent.setText("提交申请成功");
tvAwardNext.setText("需要更多现金");
break;
case Constant.CARRIER_VERSUS_HEALTH:// 任务赚健康
case Constant.CARRIER_HOMEPAGE_YWHZ:// 首页高额游戏挑战奖励
case Constant.CARRIER_MOBILE_COIN_EXCHANGE_REWARD:// 任务赚健康
tvAwardContent.setText("恭喜获取" + curCoin + "钻石");
tvAwardNext.setVisibility(View.GONE);
llAwardBg.setBackground(getResources().getDrawable(R.mipmap.bg_award_gold));
break;
case Constant.CARRIER_VERSUS_HEALTH:// 任务赚健康
tvAwardContent.setText("恭喜获取" + curCoin + "金币");
tvAwardNext.setVisibility(View.GONE);
llAwardBg.setBackground(getResources().getDrawable(R.mipmap.bg_award_gold));
// tvAwardNext.setText("我知道了");
break;
default:
tvAwardContent.setText("恭喜获取" + curCoin + "金币");
......
......@@ -36,6 +36,7 @@ import java.util.HashMap;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cn.sharesdk.framework.Platform;
import cn.sharesdk.framework.ShareSDK;
......@@ -95,14 +96,18 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
TextView tvDrawcashFriendsnextTop;
@Bind(R.id.ll_drawcash_top)
LinearLayout llDrawcashTop;
@Bind(R.id.tv_drawcash_hint_bottom)
TextView tvDrawcashHintBottom;
@Bind(R.id.tv_drawcash_friends_bottom)
TextView tvDrawcashFriendsBottom;
@Bind(R.id.tv_drawcash_friendsnext_bottom)
TextView tvDrawcashFriendsnextBottom;
@Bind(R.id.ll_drawcash_bottom)
LinearLayout llDrawcashBottom;
@Bind(R.id.tv_activity_right)
TextView tvActivityRight;
@Bind(R.id.tv_drawcash_diamond)
TextView tvDrawcashDiamond;
@Bind(R.id.tv_drawcash_aboutcash_diamond)
TextView tvDrawcashAboutcashDiamond;
@Bind(R.id.btn_drawcash_six)
Button btnDrawcashSix;
@Bind(R.id.tv_drawcash_diamond_hint)
TextView tvDrawcashDiamondHint;
@Bind(R.id.ll_drawcash_diamond)
LinearLayout llDrawcashDiamond;
private DrawcashPresenter drawcashPresenter;
......@@ -112,18 +117,28 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
private TTBannerManager ttUtil;
DrawcashBean userConfig = null;
private boolean cashOut1yuan = false;//true-提现过1元
private boolean cashOut2yuan = false;//true-提现过2元
private boolean cashOut1yuan = false;//true-提现过0.1元
private boolean cashOut2yuan = false;//true-提现过100元
private boolean cashOut4yuan = false;//true-提现过1元
private String paymentType = "weixin";
private WXInfo wxInfo = null;
private LoginApi loginApi = null;
private String cashStr;
private double drawcash;
private String diamondCashStr;
private double drawcash1;
private int drawcash2;
private int drawcash3;
private int drawcash4;
private int drawcash5;
private int drawcash6;
private UserManager userManager;
private InsertScreenAdManager insertScreenAd;
private SPUtil spUtil;
private int curBtnNum = 1;
@Override
protected int getContentViewLayoutID() {
......@@ -135,6 +150,8 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
drawcashPresenter = new DrawcashPresenter();
drawcashPresenter.attachView(this);
tvActivityRight.setVisibility(View.VISIBLE);
tvActivityRight.setText("提现记录");
tvActivityTitle.setText("提现");
userManager = UserManager.getInstance();
......@@ -157,7 +174,7 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
*/
private void initTTBanner() {
ttUtil = new TTBannerManager();
ttUtil.initTTAd(getContext(), true);
ttUtil.initTTAd(getContext(), false);
ttUtil.getBannerInit(getContext(), TTAdManagerHolder.TT_AD_BANNER_ID_DRAWCASH, flDrawcashTtbanner, 370, 80);
}
......@@ -170,11 +187,10 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
protected void onResume() {
super.onResume();
if (llDrawcashBottom != null) {
if (AntiShake.check(llDrawcashBottom.getId())) return;
if (llDrawcashTop != null) {
if (AntiShake.check(llDrawcashTop.getId())) return;
}
// System.out.println("mcg __ drawcash onresume");
insertScreenAd.showInsertScreenAd(Constant.CARRIER_DRAWCASH);
drawcashPresenter.getUserTaskMsg();
}
......@@ -215,22 +231,49 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
}
userConfig = data;
// 获取面值
drawcash1 = data.getFirstValue();
List<DrawcashBean.CashOutMoneyArrBean> cashOutMoneyArr = userConfig.getCashOutMoneyArr();
if (cashOutMoneyArr != null && cashOutMoneyArr.size() > 1) {
DrawcashBean.CashOutMoneyArrBean moneyArrBean = cashOutMoneyArr.get(0);
DrawcashBean.CashOutMoneyArrBean moneyArrBean1 = cashOutMoneyArr.get(1);
cashOut1yuan = moneyArrBean.isCanUseOnce();
cashOut2yuan = moneyArrBean1.isCanUseOnce();
drawcash = moneyArrBean.getMoney();
DrawcashBean.CashOutMoneyArrBean moneyArrBean1 = cashOutMoneyArr.get(0);
DrawcashBean.CashOutMoneyArrBean moneyArrBean2 = cashOutMoneyArr.get(1);
DrawcashBean.CashOutMoneyArrBean moneyArrBean3 = cashOutMoneyArr.get(2);
cashOut1yuan = moneyArrBean1.isCanUseOnce();
cashOut2yuan = moneyArrBean2.isCanUseOnce();
drawcash2 = moneyArrBean2.getMoney();
drawcash3 = moneyArrBean3.getMoney();
}
List<DrawcashBean.CashOutMoneyArrBean> cashOutDiamondsArr = userConfig.getCashOutDiamondsArr();
if (cashOutDiamondsArr != null && cashOutDiamondsArr.size() > 1) {
DrawcashBean.CashOutMoneyArrBean moneyArrBean1 = cashOutDiamondsArr.get(0);
DrawcashBean.CashOutMoneyArrBean moneyArrBean2 = cashOutDiamondsArr.get(1);
DrawcashBean.CashOutMoneyArrBean moneyArrBean3 = cashOutDiamondsArr.get(2);
cashOut4yuan = moneyArrBean1.isCanUseOnce();
drawcash4 = moneyArrBean1.getMoney();
drawcash5 = moneyArrBean2.getMoney();
drawcash6 = moneyArrBean3.getMoney();
}
// 初始面值样式
initBtnStyle();
// 钻石是否可用
int vedioCompleteSum = data.getVedioCompleteSum();//当前完成
int vedioNeedSum = data.getVedioNeedSum();//总数
if (vedioCompleteSum < vedioNeedSum) {
llDrawcashDiamond.setVisibility(View.VISIBLE);
tvDrawcashDiamondHint.setText("观看任意" + vedioNeedSum + "个广告视频即可激活(" + vedioCompleteSum + "/" + vedioNeedSum + ")");
} else {
llDrawcashDiamond.setVisibility(View.GONE);
}
// 判断新人专享
if (cashOut1yuan || cashOut2yuan) {
if (cashOut2yuan) {
curCash = 100;
curCash = drawcash2;
clickTwo(curCash);
} else {
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
......@@ -238,7 +281,7 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
}
if (cashOut1yuan) {
curCash = drawcash;
curCash = drawcash1;
clickOne(curCash);
} else {
btnDrawcashOne.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
......@@ -248,10 +291,15 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashTwo.setEnabled(false);
btnDrawcashOne.setEnabled(false);
curCash = 150;
curCash = drawcash3;
clickThree(curCash);
}
// 钻石新人专享
if (!cashOut4yuan) {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
btnDrawcashFour.setEnabled(false);
}
// 微信为默认支付方式
if (TextUtils.equals(paymentType, "weixin")) {
......@@ -261,7 +309,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
tvDrawcashSet.setText("已授权");
}
}
if (TextUtils.equals(paymentType, "alipay")) {
if (TextUtils.isEmpty(data.getAlipayAccount())) {
tvDrawcashSet.setText("去授权");
......@@ -270,12 +317,18 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
}
}
// 当前余额
tvDrawcashGold.setText(data.getCoin() + "");
BigDecimal allcoinBig = new BigDecimal(String.valueOf(data.getCoin()));
BigDecimal rateBig = new BigDecimal("10000");
cashStr = allcoinBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString();
tvDrawcashAboutcash.setText("约" + cashStr + "元");
BigDecimal diamondBig = new BigDecimal(String.valueOf(data.getDiamonds()));
tvDrawcashDiamond.setText(data.getDiamonds() + "");
diamondCashStr = diamondBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString();
tvDrawcashAboutcashDiamond.setText("约" + diamondCashStr + "元");
tvDrawcashHint.setText("* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。" +
"\n* 因广告收益价值变化,会同步调整金币发放数量,但不影响提现功能,达标即可随时提现,请放心使用。" +
"\n* 最终解释权归本公司所有。");
......@@ -283,9 +336,6 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
@Override
public void getDrawcashSuc() {
// showToast("提交申请成功");
// drawcashPresenter.getUserTaskMsg();
Bundle bundle = new Bundle();
bundle.putInt(Constant.MAIN_CUR_FLAG, Constant.MAIN_CUR_ONE);
bundle.putString(Constant.MAIN_CARRIET_TURN, Constant.CARRIER_DRAWCASH);
......@@ -307,19 +357,21 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
@OnClick({R.id.tv_activity_back, R.id.btn_drawcash_one, R.id.btn_drawcash_two,
R.id.btn_drawcash_five, R.id.iv_drawcash_weixin, R.id.iv_drawcash_alipay,
R.id.btn_drawcash_three, R.id.btn_drawcash_four, R.id.tv_drawcash_set,
R.id.btn_drawcash_next, R.id.tv_drawcash_record, R.id.rl_drawcash_alipay,
R.id.tv_drawcash_explain, R.id.tv_drawcash_friendsnext_top, R.id.tv_drawcash_friendsnext_bottom})
R.id.btn_drawcash_next, R.id.tv_activity_right, R.id.rl_drawcash_alipay, R.id.ll_drawcash_diamond,
R.id.tv_drawcash_explain, R.id.tv_drawcash_friendsnext_top, R.id.btn_drawcash_six})
public void onClick(View view) {
switch (view.getId()) {
case R.id.tv_activity_back:
finish();
break;
case R.id.tv_drawcash_record:
case R.id.tv_activity_right:
readyGo(DrawcashRecordActivity.class);
break;
case R.id.tv_drawcash_explain:
readyGo(AccountActivity.class);
break;
case R.id.ll_drawcash_diamond:
break;
case R.id.iv_drawcash_weixin:
if (userConfig == null) {
showToast("网络异常,请检测网络");
......@@ -397,7 +449,7 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
drawcashPresenter.getUserTaskMsg();
return;
}
curCash = drawcash;
curCash = drawcash1;
clickOne(curCash);
break;
case R.id.btn_drawcash_two:
......@@ -406,7 +458,7 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
drawcashPresenter.getUserTaskMsg();
return;
}
curCash = 100;
curCash = drawcash2;
clickTwo(curCash);
break;
case R.id.btn_drawcash_three:
......@@ -415,7 +467,7 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
drawcashPresenter.getUserTaskMsg();
return;
}
curCash = 150;
curCash = drawcash3;
clickThree(curCash);
break;
case R.id.btn_drawcash_four:
......@@ -424,11 +476,10 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
drawcashPresenter.getUserTaskMsg();
return;
}
curCash = 200;
curCash = drawcash4;
clickFour(curCash);
break;
case R.id.tv_drawcash_friendsnext_top:
case R.id.tv_drawcash_friendsnext_bottom:
readyGo(FriendsNewActivity.class);
break;
case R.id.btn_drawcash_five:
......@@ -437,9 +488,18 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
drawcashPresenter.getUserTaskMsg();
return;
}
curCash = 500;
curCash = drawcash5;
clickFive(curCash);
break;
case R.id.btn_drawcash_six:
if (userConfig == null) {
showToast("网络异常,请检测网络");
drawcashPresenter.getUserTaskMsg();
return;
}
curCash = drawcash6;
clickSix(curCash);
break;
case R.id.btn_drawcash_next:
if (userConfig == null) {
showToast("网络异常,请检测网络");
......@@ -447,16 +507,26 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
return;
}
if (!TextUtils.isEmpty(cashStr) && Double.valueOf(cashStr) < curCash) {
showToast("余额不足,快去做任务吧");
return;
// 用户余额是否满足
if (curBtnNum <= 3) {
if (!TextUtils.isEmpty(cashStr) && Double.valueOf(cashStr) < curCash) {
showToast("金币不足,快去做任务吧");
return;
}
} else {
if (!TextUtils.isEmpty(diamondCashStr) && Double.valueOf(diamondCashStr) < curCash) {
showToast("钻石不足,快去做任务吧");
return;
}
}
// 是否登录
if (!userManager.userIsLogin()) {
readyGo(WxLoginActivity.class);
return;
}
// 是否绑定手机号
if (TextUtils.isEmpty(userManager.getMobile())) {
Bundle bundle = new Bundle();
bundle.putBoolean(Constant.LOGIN_FLAG, true);
......@@ -495,6 +565,7 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
}
}
// 本地是否保存地理位置
new RxPermissions(DrawcashActivity.this)
.request(Manifest.permission.READ_PHONE_STATE, Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION)
......@@ -522,51 +593,29 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
if (userConfig != null) {
int coin = userConfig.getCoin();
List<DrawcashBean.CashOutMoneyArrBean> outMoneyArr = userConfig.getCashOutMoneyArr();
if (cash == 100 && coin >= 1000000) {
if (cash == drawcash2 && coin >= (drawcash2 * 10000)) {
if (outMoneyArr != null && outMoneyArr.size() >= 1) {
DrawcashBean.CashOutMoneyArrBean moneyArrBean = outMoneyArr.get(1);
llDrawcashTop.setVisibility(View.VISIBLE);
llDrawcashBottom.setVisibility(View.GONE);
tvDrawcashHintTop.setText("邀请" + moneyArrBean.getNeedFs() + "位好友且每位好友获得" + moneyArrBean.getFsGiveCoin() + "金币即可提现");
tvDrawcashFriendsTop.setText("可用有效好友数: " + moneyArrBean.getNowFriends() + " / " + moneyArrBean.getNeedFs());
}
} else if (cash == 150 && coin >= 1500000) {
} else if (cash == drawcash3 && coin >= (drawcash3 * 10000)) {
if (outMoneyArr != null && outMoneyArr.size() >= 2) {
DrawcashBean.CashOutMoneyArrBean moneyArrBean = outMoneyArr.get(2);
llDrawcashTop.setVisibility(View.VISIBLE);
llDrawcashBottom.setVisibility(View.GONE);
tvDrawcashHintTop.setText("邀请" + moneyArrBean.getNeedFs() + "位好友且每位好友获得" + moneyArrBean.getFsGiveCoin() + "金币即可提现");
tvDrawcashFriendsTop.setText("可用有效好友数: " + moneyArrBean.getNowFriends() + " / " + moneyArrBean.getNeedFs());
}
} else if (cash == 200 && coin >= 2000000) {
if (outMoneyArr != null && outMoneyArr.size() >= 3) {
DrawcashBean.CashOutMoneyArrBean moneyArrBean = outMoneyArr.get(3);
llDrawcashTop.setVisibility(View.GONE);
llDrawcashBottom.setVisibility(View.VISIBLE);
tvDrawcashHintBottom.setText("邀请" + moneyArrBean.getNeedFs() + "位好友且每位好友获得" + moneyArrBean.getFsGiveCoin() + "金币即可提现");
tvDrawcashFriendsBottom.setText("可用有效好友数: " + moneyArrBean.getNowFriends() + " / " + moneyArrBean.getNeedFs());
}
} else if (cash == 500 && coin >= 5000000) {
if (outMoneyArr != null && outMoneyArr.size() >= 4) {
DrawcashBean.CashOutMoneyArrBean moneyArrBean = outMoneyArr.get(4);
llDrawcashTop.setVisibility(View.GONE);
llDrawcashBottom.setVisibility(View.VISIBLE);
tvDrawcashHintBottom.setText("邀请" + moneyArrBean.getNeedFs() + "位好友且每位好友获得" + moneyArrBean.getFsGiveCoin() + "金币即可提现");
tvDrawcashFriendsBottom.setText("可用有效好友数: " + moneyArrBean.getNowFriends() + " / " + moneyArrBean.getNeedFs());
}
} else {
llDrawcashTop.setVisibility(View.GONE);
llDrawcashBottom.setVisibility(View.GONE);
}
} else {
llDrawcashTop.setVisibility(View.GONE);
llDrawcashBottom.setVisibility(View.GONE);
}
}
......@@ -578,11 +627,18 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
if (cashOut4yuan) {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
} else {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:" + (drawcash * 10000));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:" + (int) (drawcash1 * 10000));
setDrawLayout(cash);
curBtnNum = 1;
}
private void clickTwo(double cash) {
......@@ -593,11 +649,18 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
}
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_enable));
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
if (cashOut4yuan) {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
} else {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:1000000");
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:" + (drawcash2 * 10000));
setDrawLayout(cash);
curBtnNum = 2;
}
private void clickThree(double cash) {
......@@ -612,10 +675,17 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
if (cashOut4yuan) {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
} else {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:1500000");
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:" + (drawcash3 * 10000));
setDrawLayout(cash);
curBtnNum = 3;
}
private void clickFour(double cash) {
......@@ -630,11 +700,12 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_enable));
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需金币:2000000");
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需钻石:" + (drawcash4 * 10000));
setDrawLayout(cash);
curBtnNum = 4;
}
private void clickFive(double cash) {
......@@ -649,43 +720,74 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
if (cashOut4yuan) {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
} else {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashHint.setText("所需金币:5000000");
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashHint.setText("所需钻石:" + (drawcash5 * 10000));
setDrawLayout(cash);
curBtnNum = 5;
}
private void clickSix(double cash) {
if (cashOut1yuan) {
btnDrawcashOne.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
} else {
btnDrawcashOne.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
if (cashOut2yuan) {
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
} else {
btnDrawcashTwo.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashThree.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
if (cashOut4yuan) {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_none));
} else {
btnDrawcashFour.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_new_dont));
}
btnDrawcashFive.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_none));
btnDrawcashSix.setBackground(getResources().getDrawable(R.mipmap.ic_drawcash_enable));
btnDrawcashHint.setText("所需钻石:" + (drawcash6 * 10000));
setDrawLayout(cash);
curBtnNum = 6;
}
private void initBtnStyle() {
btnDrawcashOne.setText(new SpanUtils()
.append(drawcash + "元").setForegroundColor(getResources().getColor(R.color.product_text))
.append(drawcash1 + "元").setForegroundColor(getResources().getColor(R.color.product_text))
.append("\n")
.append("约" + (drawcash * 10000) + "金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.append("约" + (drawcash1 * 10000) + "金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
btnDrawcashTwo.setText(new SpanUtils()
.append("100元").setForegroundColor(getResources().getColor(R.color.product_text))
.append(drawcash2 + "元").setForegroundColor(getResources().getColor(R.color.product_text))
.append("\n")
.append("约1000000金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.append("约" + (drawcash2 * 10000) + "金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
btnDrawcashThree.setText(new SpanUtils()
.append("150元").setForegroundColor(getResources().getColor(R.color.product_text))
.append(drawcash3 + "元").setForegroundColor(getResources().getColor(R.color.product_text))
.append("\n")
.append("约1500000金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.append("约" + (drawcash3 * 10000) + "金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
btnDrawcashFour.setText(new SpanUtils()
.append("200元").setForegroundColor(getResources().getColor(R.color.product_text))
.append(drawcash4 + "元").setForegroundColor(getResources().getColor(R.color.product_text))
.append("\n")
.append("约2000000金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.append("约" + (drawcash4 * 10000) + "钻石").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
btnDrawcashFive.setText(new SpanUtils()
.append("500元").setForegroundColor(getResources().getColor(R.color.product_text))
.append(drawcash5 + "元").setForegroundColor(getResources().getColor(R.color.product_text))
.append("\n")
.append("约5000000金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.append("约" + (drawcash5 * 10000) + "钻石").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
tvDrawcashExplain.setText(new SpanUtils()
.append("100元").setForegroundColor(getResources().getColor(R.color.product_text))
btnDrawcashSix.setText(new SpanUtils()
.append(drawcash6 + "元").setForegroundColor(getResources().getColor(R.color.product_text))
.append("\n")
.append("约1000000金币").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.append("约" + (drawcash6 * 10000) + "钻石").setFontSize(26).setForegroundColor(getResources().getColor(R.color.authentic_none))
.create());
tvDrawcashExplain.setText(
......@@ -696,13 +798,13 @@ public class DrawcashActivity extends BaseActivity implements DrawcashView, OnLo
.append("\n")
.append("2、由于提现需要实名制,非实名用户账号无法支持提现,请务必使用实名认证过的账号提现!")
.append("\n")
.append("3、单笔提现金额最低" + drawcash + "元,最高500元。")
.append("3、单笔提现金额最低" + drawcash1 + "元,最高" + drawcash3 + "元。")
.append("\n")
.append("4、提现申请将在1-3个工作日审核到账,请耐心等待。")
.append("\n")
.append("5、每日可申请提现一次,若当日限额已满,请次日申请。")
.append("\n")
.append("6、" + drawcash + "元,100元提现是新人专享福利,每个账号仅可享受一次。")
.append("6、" + drawcash1 + "元," + drawcash2 + "元,是新人专享福利,每个账号仅可享受一次。")
.create());
}
......
......@@ -55,7 +55,6 @@ public class GoldTryActivity extends BaseActivity implements GoldTryView,
protected void initViewsAndEvents() {
tvActivityTitle.setText("金币兑换");
goldTryPresenter = new GoldTryPresenter();
goldTryPresenter.attachView(this);
......@@ -74,7 +73,6 @@ public class GoldTryActivity extends BaseActivity implements GoldTryView,
public void onDestroy() {
super.onDestroy();
goldTryPresenter.detachView();
}
......
......@@ -346,11 +346,11 @@ public class LoginActivity extends BaseActivity implements LoginView {
@Override
public void loginSuc() {
// try {
// // 登录成功初始化鱼玩盒子userid
// getBaseApplication().initYwSdk();
// } catch (Exception e) {
// }
try {
// 登录成功初始化鱼玩盒子userid
getBaseApplication().initYwSdk();
} catch (Exception e) {
}
// try {
// 登录成功初始化愉悦推
......
......@@ -230,11 +230,11 @@ public class WxLoginActivity extends BaseActivity implements WxLoginView, OnLogi
public void loginSuc() {
// UserManager.getInstance().userLogout();
// try {
// // 登录成功初始化鱼玩盒子userid
// getBaseApplication().initYwSdk();
// } catch (Exception e) {
// }
try {
// 登录成功初始化鱼玩盒子userid
getBaseApplication().initYwSdk();
} catch (Exception e) {
}
// try {
// 登录成功初始化愉悦推
......
......@@ -59,6 +59,7 @@ public class GoldRecordAdapter extends BaseAdapter {
viewHolder.tv_goldrecord_time = (TextView) convertView.findViewById(R.id.tv_goldrecord_time);
viewHolder.tv_goldrecord_content = (TextView) convertView.findViewById(R.id.tv_goldrecord_content);
viewHolder.tv_goldrecord_cash = (TextView) convertView.findViewById(R.id.tv_goldrecord_cash);
viewHolder.tv_goldrecord_cash_type = (TextView) convertView.findViewById(R.id.tv_goldrecord_cash_type);
convertView.setTag(viewHolder);
} else {
......@@ -84,10 +85,25 @@ public class GoldRecordAdapter extends BaseAdapter {
switch (data.getType()) {//2-积分兑换入账 3-朋友推荐入账
case 0://增加
if(data.getRewardType()==0){
// 0-金币
viewHolder.tv_goldrecord_cash.setText("金币");
viewHolder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(context, R.color.main_mints));
}else{
viewHolder.tv_goldrecord_cash.setText("钻石");
viewHolder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(context, R.color.versus_task_play_text));
}
viewHolder.tv_goldrecord_cash.setText("+" + data.getUnitCoin());
viewHolder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(context, R.color.main_mints));
break;
default://减少
if(data.getRewardType()==0){
// 0-金币
viewHolder.tv_goldrecord_cash.setText("金币");
}else{
viewHolder.tv_goldrecord_cash.setText("钻石");
}
viewHolder.tv_goldrecord_cash.setText("-" + data.getUnitCoin());
viewHolder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(context, R.color.loan_green));
break;
......@@ -101,6 +117,7 @@ public class GoldRecordAdapter extends BaseAdapter {
public TextView tv_goldrecord_time;
public TextView tv_goldrecord_content;
public TextView tv_goldrecord_cash;
public TextView tv_goldrecord_cash_type;
}
}
......@@ -79,17 +79,8 @@ public class MainGameAdapter extends BaseAdapter {
viewHolder.iv_main_item_gametype.setBackground(context.getResources().getDrawable(R.mipmap.ic_game_hot));
} else if (hotType == 2) {
viewHolder.iv_main_item_gametype.setBackground(context.getResources().getDrawable(R.mipmap.ic_game_new));
}
// if (hotType == 2) {
// destoryTimerList();
// startTime(viewHolder.tv_main_item_next, 60, gameList.getButtonText());
// } else {
// viewHolder.tv_main_item_next.setText(gameList.getButtonText());
// viewHolder.tv_main_item_next.setBackground(context.getResources().getDrawable(R.drawable.shape_main_water));
// }
GlideUtils.loadImageViewLoding(context, gameList.getImgUrl(), viewHolder.ic_main_item_game, R.mipmap.ic_launcher, R.mipmap.ic_launcher);
viewHolder.tv_main_item_title.setText(gameList.getTitle());
viewHolder.tv_main_item_gold.setText("+" + gameList.getCoin());
......@@ -99,12 +90,17 @@ public class MainGameAdapter extends BaseAdapter {
if (gameList.getStatus() == 0) {
//0-未完成不可点击领取 1-已完成挑战可以领取 2-已领取不可再领取
viewHolder.tv_main_item_next.setBackground(context.getResources().getDrawable(R.drawable.shape_main_water));
} else if(gameList.getStatus() == 1){
} else if (gameList.getStatus() == 1) {
viewHolder.tv_main_item_next.setBackground(context.getResources().getDrawable(R.drawable.shape_tv_gold));
}else{
} else {
viewHolder.tv_main_item_next.setBackground(context.getResources().getDrawable(R.drawable.shape_tv_gold_gury));
}
if (gameList.getRewardType() == 0) {
viewHolder.tv_main_item_gold.setCompoundDrawablesWithIntrinsicBounds(context.getResources().getDrawable(R.mipmap.ic_gold), null, null, null);
} else {
viewHolder.tv_main_item_gold.setCompoundDrawablesWithIntrinsicBounds(context.getResources().getDrawable(R.mipmap.ic_diamond), null, null, null);
}
}
return convertView;
......
......@@ -969,6 +969,48 @@ public class MainFragment extends BaseFragment
getRandomVedioAd(Constant.CARRIER_DAILY_VIDEO, userConfig.getVideoCoin(), "", userConfig.getConfigH5DownloadCoin());
}
} else if (TextUtils.equals(gameId, "homeywhz")) {
// 鱼玩盒子
//0-未完成挑战,不可点击领取 1-已完成挑战可以领取 2-已领取不可再领取
int status = gameList.get(position).getStatus();
switch (status) {
case 0:
case 2:
if (!userManager.userIsLogin()) {
readyGo(WxLoginActivity.class);
return;
}
new RxPermissions(getActivity())
.request(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE)
.subscribe(granted -> {
if (granted) {
try {
YwSDK_WebActivity.Companion.open(getActivity());
// toggleIsBack2Left();
} catch (Exception e) {
e.printStackTrace();
showToast("暂不支持该版本");
}
} else {
showMissingPermissionDialog("设备、储存");
}
});
break;
case 1:
HashMap<String, Object> vo = new HashMap<>();
vo.put("gameId", gameId);
vo.put("carrierType", Constant.CARRIER_HOMEPAGE_YWHZ);
loanPresenter.reportAddCoinMsg(vo, "");
Bundle bundle = new Bundle();
bundle.putString(Constant.MAIN_CARRIET_TURN, Constant.CARRIER_HOMEPAGE_YWHZ);
bundle.putInt(Constant.MAIN_CUR_FLAG, Constant.MAIN_CUR_ONE);
bundle.putInt(Constant.MAIN_CUR_COIN, gameList.get(position).getCoin());
// bundle.putInt(Constant.MAIN_ALL_COIN, userConfig.getCoin());
readyGo(AwardActivity.class, bundle);
break;
}
} else if (TextUtils.equals(gameId, "homemobile")) {
// 移动积分
//0-未完成挑战,不可点击领取 1-已完成挑战可以领取 2-已领取不可再领取
......
......@@ -560,22 +560,6 @@ public class VersusFragment extends BaseFragment
showToast("挑战看视频任务已完成,请明日再来");
return;
}
// if (!isFirstVedioTimeFlag) {
// int sysTaskTimeInterval = userConfig.getSys_task_time_interval();
// if (sysTaskTimeInterval > 0) {
// startTime(sysTaskTimeInterval * 60 * 1000);
// }
// loadAd(Constant.CARRIER_VERSUS_VIDEO, TTAdManagerHolder.TT_AD_VEDIO_MAIN_2);
// }
// if (!isFirstVedioTimeFlag) {
// int sysTaskTimeInterval = userConfig.getSys_task_time_interval();
// if (sysTaskTimeInterval > 0) {
// startTime(sysTaskTimeInterval * 60 * 1000);
// }
// getRandomVedioAd(Constant.CARRIER_VERSUS_VIDEO, userConfig.getChallenge_vedio1_vedio_coin(), "", userConfig.getChallenge_vedio1_download_coin());
// }
getRandomVedioAd(Constant.CARRIER_VERSUS_VIDEO, userConfig.getChallenge_vedio1_vedio_coin(), "", userConfig.getChallenge_vedio1_download_coin());
break;
case R.id.ll_versus_tryplay:
......@@ -584,14 +568,6 @@ public class VersusFragment extends BaseFragment
showToast("挑战玩应用任务已完成,请明日再来");
return;
}
// loadAd(Constant.CARRIER_VERSUS_DOWNLOAD, TTAdManagerHolder.TT_AD_VEDIO_MAIN_2);
// tryVedio();
// getRandomVedioAd(Constant.CARRIER_VERSUS_VIDEO, userConfig.getChallenge_download1_vedio_coin(), "", userConfig.getChallenge_download1_download_coin());
break;
case R.id.ll_versus_drinktea:
case R.id.tv_versus_drinktea:
......@@ -923,19 +899,16 @@ public class VersusFragment extends BaseFragment
}
// 鱼玩盒子
// if (userManager.getAdShowFlag()) {
//// if (Build.VERSION.SDK_INT <= 28) {
// // 目前只支持anrdoid 10以下
// tvVersusYwhzgold.setText("+" + data.getYwhzCoin());
// if (data.isYwhzShow()) {
// llVersusYwhz.setVisibility(View.VISIBLE);
// viewVersusYwhz.setVisibility(View.VISIBLE);
// } else {
// llVersusYwhz.setVisibility(View.GONE);
// viewVersusYwhz.setVisibility(View.GONE);
// }
//// }
// }
if (userManager.getAdShowFlag()) {
tvVersusYwhzgold.setText("+" + data.getYwhzCoin());
if (data.isYwhzShow()) {
llVersusYwhz.setVisibility(View.VISIBLE);
viewVersusYwhz.setVisibility(View.VISIBLE);
} else {
llVersusYwhz.setVisibility(View.GONE);
viewVersusYwhz.setVisibility(View.GONE);
}
}
// ----------------------------
//第一次喝水 Complete 0-未完成 1-完成 2-领取
......@@ -2261,6 +2234,7 @@ public class VersusFragment extends BaseFragment
});
vedioAdingManager.loadAding(bean);
}
/**
* 广告返回结果
*
......
......@@ -113,6 +113,11 @@ public class GlideUtils {
Glide.with(mContext).load(path).asGif().into(mImageView);
}
//设置动态GIF Drawable
public static void loadImageViewGif(Context mContext, int drawPath, ImageView mImageView) {
Glide.with(mContext).load(drawPath).asGif().into(mImageView);
}
//设置静态GIF加载方式
public static void loadImageViewStaticGif(Context mContext, String path, ImageView mImageView) {
Glide.with(mContext).load(path).asBitmap().into(mImageView);
......
......@@ -13,7 +13,6 @@
android:layout_weight="1"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -24,145 +23,46 @@
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginLeft="50pt"
android:layout_marginTop="10pt"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="60pt"
android:text="当前金币"
android:textColor="@color/graya"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_drawcash_record"
android:id="@+id/tv_drawcash_gold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="30pt"
android:background="@mipmap/ic_drawcash_record"
android:drawableLeft="@mipmap/ic_drawcash_recordleft"
android:drawablePadding="10pt"
android:gravity="center_vertical"
android:paddingLeft="16pt"
android:layout_marginLeft="10pt"
android:layout_marginRight="10pt"
android:text="0"
android:textColor="@color/main_mints"
android:textSize="26sp" />
<TextView
android:id="@+id/tv_drawcash_aboutcash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-16pt"
android:background="@mipmap/ic_goldtry_about"
android:paddingLeft="10pt"
android:paddingTop="6pt"
android:paddingRight="10pt"
android:paddingBottom="6pt"
android:text="提现记录"
android:text="约0.00元"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
<TextView
android:id="@+id/tv_drawcash_gold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10pt"
android:text="0"
android:textColor="@color/main_mints"
android:textSize="26sp" />
<TextView
android:id="@+id/tv_drawcash_aboutcash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10pt"
android:text="0.00"
android:textColor="@color/red"
android:textSize="16sp" />
<View
android:layout_width="match_parent"
android:layout_height="10pt"
android:layout_marginTop="40pt"
android:layout_marginBottom="20pt"
android:background="@color/order_hint_color" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50pt"
android:text="提现方式"
android:textColor="@color/black"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40pt"
android:layout_marginTop="20pt"
android:layout_marginRight="40pt"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_drawcash_weixin"
android:layout_width="0dp"
android:layout_height="136pt"
android:layout_weight="1"
android:scaleType="fitXY"
android:src="@mipmap/ic_drawcash_wx_enable" />
<ImageView
android:id="@+id/iv_drawcash_alipay"
android:layout_width="0dp"
android:layout_height="136pt"
android:layout_marginLeft="26pt"
android:layout_weight="1"
android:scaleType="fitXY"
android:src="@mipmap/ic_drawcash_alipay_none" />
android:textSize="10sp" />
</LinearLayout>
<RelativeLayout
android:id="@+id/rl_drawcash_alipay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="22pt"
android:layout_marginTop="40pt">
<TextView
android:id="@+id/tv_drawcash_paytype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:drawableLeft="@mipmap/ic_weixin"
android:drawablePadding="10pt"
android:gravity="center_vertical"
android:paddingLeft="28pt"
android:paddingTop="10pt"
android:paddingBottom="10pt"
android:text="微信"
android:textColor="@color/graya"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_drawcash_set"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="50pt"
android:drawableRight="@mipmap/ic_right_arrow"
android:drawablePadding="10pt"
android:gravity="center_vertical"
android:text="去授权"
android:textColor="@color/main_mints"
android:textSize="14sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="10pt"
android:layout_marginTop="10pt"
android:layout_marginBottom="20pt"
android:background="@color/order_hint_color" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -208,14 +108,14 @@
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/ll_drawcash_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="60pt"
android:layout_marginTop="10pt"
android:layout_marginRight="60pt"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
......@@ -263,102 +163,222 @@
</LinearLayout>
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="10pt"
android:layout_marginTop="30pt"
android:background="@color/order_hint_color" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="10pt"
android:paddingBottom="30pt">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50pt"
android:layout_marginTop="10pt"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="当前钻石"
android:textColor="@color/graya"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_drawcash_diamond"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10pt"
android:layout_marginRight="10pt"
android:text="0"
android:textColor="@color/main_mints"
android:textSize="26sp" />
<TextView
android:id="@+id/tv_drawcash_aboutcash_diamond"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-16pt"
android:background="@mipmap/ic_goldtry_about"
android:paddingLeft="10pt"
android:paddingTop="6pt"
android:paddingRight="10pt"
android:paddingBottom="6pt"
android:text="约0.00元"
android:textColor="@color/white"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50pt"
android:layout_marginRight="50pt"
android:gravity="center_vertical"
android:orientation="horizontal">
<Button
android:id="@+id/btn_drawcash_four"
android:layout_width="0dp"
android:layout_height="160pt"
android:layout_weight="1"
android:background="@drawable/rb_index_checked"
android:gravity="center"
android:text="提现1元"
android:textColor="@drawable/rb_index_text_color"
android:textSize="16sp" />
<Button
android:id="@+id/btn_drawcash_five"
android:layout_width="0dp"
android:layout_height="160pt"
android:layout_marginLeft="16pt"
android:layout_weight="1"
android:background="@drawable/rb_index_checked"
android:gravity="center"
android:text="提现2元"
android:textColor="@drawable/rb_index_text_color"
android:textSize="16sp" />
<Button
android:id="@+id/btn_drawcash_six"
android:layout_width="0dp"
android:layout_height="160pt"
android:layout_marginLeft="16pt"
android:layout_weight="1"
android:background="@drawable/rb_index_checked"
android:gravity="center"
android:text="提现3元"
android:textColor="@drawable/rb_index_text_color"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_drawcash_diamond"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#90000000"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@mipmap/ic_drawcash_lock"
android:drawablePadding="10pt"
android:gravity="center_vertical"
android:text="未激活"
android:textColor="@color/white"
android:textSize="20sp" />
<TextView
android:id="@+id/tv_drawcash_diamond_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16pt"
android:text="观看任意5个广告视频即可激活(0/5)"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="10pt"
android:layout_marginBottom="20pt"
android:background="@color/order_hint_color" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50pt"
android:text="提现方式"
android:textColor="@color/black"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40pt"
android:layout_marginTop="20pt"
android:layout_marginRight="50pt"
android:gravity="center_vertical"
android:layout_marginRight="40pt"
android:orientation="horizontal">
<Button
android:id="@+id/btn_drawcash_four"
android:layout_width="0dp"
android:layout_height="160pt"
android:layout_weight="1"
android:background="@drawable/rb_index_checked"
android:gravity="center"
android:text="提现200元"
android:textColor="@drawable/rb_index_text_color"
android:textSize="16sp" />
<Button
android:id="@+id/btn_drawcash_five"
<ImageView
android:id="@+id/iv_drawcash_weixin"
android:layout_width="0dp"
android:layout_height="160pt"
android:layout_marginLeft="16pt"
android:layout_height="136pt"
android:layout_weight="1"
android:background="@drawable/rb_index_checked"
android:gravity="center"
android:text="提现500元"
android:textColor="@drawable/rb_index_text_color"
android:textSize="16sp" />
android:scaleType="fitXY"
android:src="@mipmap/ic_drawcash_wx_enable" />
<Button
<ImageView
android:id="@+id/iv_drawcash_alipay"
android:layout_width="0dp"
android:layout_height="160pt"
android:layout_marginLeft="16pt"
android:layout_height="136pt"
android:layout_marginLeft="26pt"
android:layout_weight="1"
android:visibility="invisible" />
android:scaleType="fitXY"
android:src="@mipmap/ic_drawcash_alipay_none" />
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/ll_drawcash_bottom"
<RelativeLayout
android:id="@+id/rl_drawcash_alipay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="60pt"
android:layout_marginTop="10pt"
android:layout_marginRight="60pt"
android:orientation="vertical">
android:layout_marginLeft="22pt"
android:layout_marginTop="30pt">
<TextView
android:id="@+id/tv_drawcash_paytype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="提现说明"
android:textColor="@color/black"
android:layout_centerVertical="true"
android:drawableLeft="@mipmap/ic_weixin"
android:drawablePadding="10pt"
android:gravity="center_vertical"
android:paddingLeft="28pt"
android:paddingTop="10pt"
android:paddingBottom="10pt"
android:text="微信"
android:textColor="@color/graya"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_drawcash_hint_bottom"
android:id="@+id/tv_drawcash_set"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20pt"
android:text="每新邀请X位有效好友即可提现,提现成功立返8x金币"
android:textColor="@color/graya"
android:textSize="12sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20pt">
<TextView
android:id="@+id/tv_drawcash_friends_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="可用有效好友数"
android:textColor="@color/main_mints"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_drawcash_friendsnext_bottom"
android:layout_width="150pt"
android:layout_height="60pt"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/shape_tv_gold"
android:gravity="center"
android:text="邀请好友"
android:textColor="@color/white"
android:textSize="10sp" />
</RelativeLayout>
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="50pt"
android:drawableRight="@mipmap/ic_right_arrow"
android:drawablePadding="10pt"
android:gravity="center_vertical"
android:text="去授权"
android:textColor="@color/main_mints"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="10pt"
android:layout_marginTop="10pt"
android:layout_marginBottom="20pt"
android:background="@color/order_hint_color" />
<TextView
......
......@@ -817,7 +817,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="10pt"
android:layout_toRightOf="@+id/tv_versus_exchange_title"
android:drawableLeft="@mipmap/ic_gold"
android:drawableLeft="@mipmap/ic_diamond"
android:drawablePadding="2pt"
android:gravity="center_vertical"
android:textColor="@color/main_mints"
......@@ -898,7 +898,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="10pt"
android:layout_toRightOf="@+id/tv_versus_ywhz_title"
android:drawableLeft="@mipmap/ic_gold"
android:drawableLeft="@mipmap/ic_diamond"
android:drawablePadding="2pt"
android:gravity="center_vertical"
android:text="+10w"
......
......@@ -58,6 +58,7 @@
android:textSize="14sp" />
<TextView
android:id="@+id/tv_goldrecord_cash_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="金币"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment