|
|
@@ -9,6 +9,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
|
import com.chad.library.adapter.base.BaseViewHolder;
|
|
|
import com.kfzs.duanduan.utils.NumberFormatUtils;
|
|
|
import com.sheep.gamegroup.model.entity.Applications;
|
|
|
+import com.sheep.gamegroup.util.CommonUtil;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
@@ -26,6 +27,7 @@ public class AdpGameGroupGameCompare extends BaseQuickAdapter<Applications, Base
|
|
|
}
|
|
|
|
|
|
public static boolean canDownload = false;
|
|
|
+
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, Applications item) {
|
|
|
TextView item_gggc_download_tv = helper.getView(R.id.item_gggc_download_tv);
|
|
|
@@ -37,8 +39,17 @@ public class AdpGameGroupGameCompare extends BaseQuickAdapter<Applications, Base
|
|
|
AppCompatRatingBar item_gggc_score_acrb = helper.itemView.findViewById(R.id.item_gggc_score_acrb);
|
|
|
View item_gggc_line = helper.itemView.findViewById(R.id.item_gggc_line);
|
|
|
|
|
|
- item_gggc_vip_tv.setOnClickListener(view -> Jump2View.getInstance().gotoGameVipRecharge(item));
|
|
|
- if(canDownload) {
|
|
|
+ item_gggc_vip_tv.setOnClickListener(view -> {
|
|
|
+ CommonUtil.getInstance().getUserInfo(false, user->{
|
|
|
+ if(user==null) return;
|
|
|
+ if(user.isVIP()){
|
|
|
+ Jump2View.getInstance().gotoGameVipRecharge(item);
|
|
|
+ } else {
|
|
|
+ Jump2View.getInstance().gotoVip(this.mContext);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ if (canDownload) {
|
|
|
item.getFindAppHelper().updateDownloadTaskView(true, item, item_gggc_download_tv);
|
|
|
item_gggc_download_tv.setTag("PUBLIC_TAG_PREFIX_TEXTVIEW_LIST" + item.getDownload_link());
|
|
|
}
|
|
|
@@ -47,7 +58,7 @@ public class AdpGameGroupGameCompare extends BaseQuickAdapter<Applications, Base
|
|
|
ViewUtil.setVisibility(item_gggc_v_line, showVipTv);
|
|
|
ViewUtil.setText(item_gggc_name_tv, item.getGameFrom());
|
|
|
ViewUtil.setText(item_gggc_info_tv, item.getSimpleInfo());
|
|
|
- ViewUtil.setText(item_gggc_score_tv, NumberFormatUtils.retain1(item.getScore())+"分");
|
|
|
+ ViewUtil.setText(item_gggc_score_tv, NumberFormatUtils.retain1(item.getScore()) + "分");
|
|
|
item_gggc_score_acrb.setMax(10);
|
|
|
item_gggc_score_acrb.setProgress((int) item.getScore());
|
|
|
ViewUtil.setVisibility(item_gggc_line, helper.getAdapterPosition() + 1 != getItemCount());
|