|
@@ -60,6 +60,7 @@ import com.sheep.gamegroup.util.LocationUtils;
|
|
|
import com.sheep.gamegroup.util.LogUtil;
|
|
import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.MyDbManager;
|
|
import com.sheep.gamegroup.util.MyDbManager;
|
|
|
import com.sheep.gamegroup.util.MyListview;
|
|
import com.sheep.gamegroup.util.MyListview;
|
|
|
|
|
+import com.sheep.gamegroup.util.SelfCountDownTimer;
|
|
|
import com.sheep.gamegroup.util.TimeUtil;
|
|
import com.sheep.gamegroup.util.TimeUtil;
|
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
@@ -142,6 +143,35 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
RelativeLayout ems_game_layout;
|
|
RelativeLayout ems_game_layout;
|
|
|
@BindView(R.id.detail_share_friend_tv)
|
|
@BindView(R.id.detail_share_friend_tv)
|
|
|
TextView detail_share_friend_tv;
|
|
TextView detail_share_friend_tv;
|
|
|
|
|
+ @BindView(R.id.taskdetail_user_use_layout)
|
|
|
|
|
+ LinearLayout taskdetail_user_use_layout;
|
|
|
|
|
+ @BindView(R.id.taskdetail_explain_layout)
|
|
|
|
|
+ LinearLayout taskdetail_explain_layout;
|
|
|
|
|
+ @BindView(R.id.item_exlpain_title)
|
|
|
|
|
+ TextView item_exlpain_title;
|
|
|
|
|
+ @BindView(R.id.item_exlpain_conetent)
|
|
|
|
|
+ TextView item_exlpain_conetent;
|
|
|
|
|
+ @BindView(R.id.item_notice)
|
|
|
|
|
+ TextView item_notice;
|
|
|
|
|
+
|
|
|
|
|
+ @BindView(R.id.start_task_btntv)
|
|
|
|
|
+ TextView start_task_btntv;
|
|
|
|
|
+ @BindView(R.id.start_task_line)
|
|
|
|
|
+ TextView start_task_line;
|
|
|
|
|
+ @BindView(R.id.down_task_btntv)
|
|
|
|
|
+ TextView down_task_btntv;
|
|
|
|
|
+ @BindView(R.id.down_task_line)
|
|
|
|
|
+ TextView down_task_line;
|
|
|
|
|
+ @BindView(R.id.install_task_btntv)
|
|
|
|
|
+ TextView install_task_btntv;
|
|
|
|
|
+ @BindView(R.id.install_task_line)
|
|
|
|
|
+ TextView install_task_line;
|
|
|
|
|
+ @BindView(R.id.award_task_btntv)
|
|
|
|
|
+ TextView award_task_btntv;
|
|
|
|
|
+ @BindView(R.id.end_of_time_tv)
|
|
|
|
|
+ TextView end_of_time_tv;
|
|
|
|
|
+ @BindView(R.id.num_tv)
|
|
|
|
|
+ TextView num_tv;
|
|
|
|
|
|
|
|
private Activity activity;
|
|
private Activity activity;
|
|
|
@Inject
|
|
@Inject
|
|
@@ -219,7 +249,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void initWigget() {
|
|
private void initWigget() {
|
|
|
- detail_shrae_friend_layout.setVisibility(View.GONE);
|
|
|
|
|
|
|
+ detail_shrae_friend_layout.setVisibility(View.VISIBLE);
|
|
|
|
|
|
|
|
taskEty = taskReleaseEty.getTask();
|
|
taskEty = taskReleaseEty.getTask();
|
|
|
if (taskEty.getChild() != null && taskEty.getChild().size() > 0) {
|
|
if (taskEty.getChild() != null && taskEty.getChild().size() > 0) {
|
|
@@ -247,7 +277,8 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
webText.loadDataWithBaseURL(null, sHead + taskEty.getDesc() + "</body></html>", "text/html", "utf-8", null);
|
|
webText.loadDataWithBaseURL(null, sHead + taskEty.getDesc() + "</body></html>", "text/html", "utf-8", null);
|
|
|
nameTv.setText(taskReleaseEty.getName() + "");
|
|
nameTv.setText(taskReleaseEty.getName() + "");
|
|
|
priceTv.setText("+" + taskReleaseEty.getBonus() + "元");
|
|
priceTv.setText("+" + taskReleaseEty.getBonus() + "元");
|
|
|
- dateTv.setText(TimeUtil.getDate(TimeUtil.FORMAT, Long.valueOf(taskReleaseEty.getDeadline())) + "");
|
|
|
|
|
|
|
+ dateTv.setText("截至日期:"+TimeUtil.getDate(TimeUtil.FORMAT, Long.valueOf(taskReleaseEty.getDeadline())) + "");
|
|
|
|
|
+ num_tv.setText("剩" + taskReleaseEty.getLast_num() + "份");
|
|
|
|
|
|
|
|
|
|
|
|
|
Glide.with(SheepApp.mContext)
|
|
Glide.with(SheepApp.mContext)
|
|
@@ -342,9 +373,9 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
|
|
|
|
|
taskSchedule();
|
|
taskSchedule();
|
|
|
//2.6修改
|
|
//2.6修改
|
|
|
-// if(btn_show)
|
|
|
|
|
-// bottom_btn_layout.setVisibility(View.GONE);
|
|
|
|
|
-// setSonVuewShow();
|
|
|
|
|
|
|
+ if(btn_show)
|
|
|
|
|
+ bottom_btn_layout.setVisibility(View.GONE);
|
|
|
|
|
+ setSonVuewShow();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void checkAcceptedTask() {
|
|
private void checkAcceptedTask() {
|
|
@@ -564,9 +595,9 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
case R.id.detail_share_friend_tv:
|
|
case R.id.detail_share_friend_tv:
|
|
|
try{
|
|
try{
|
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
|
- stringBuffer.append(SpUtils.getTaskDetailsUrl(activity)+"/#/?");
|
|
|
|
|
|
|
+ stringBuffer.append(SpUtils.getTaskDetailsUrl(activity)+"/?");
|
|
|
stringBuffer.append("authorization="+ SpUtils.getOpenId(activity));
|
|
stringBuffer.append("authorization="+ SpUtils.getOpenId(activity));
|
|
|
- stringBuffer.append("&task_id="+taskReleaseEty.getAccepted_task_id());
|
|
|
|
|
|
|
+ stringBuffer.append("&task_id="+taskId);
|
|
|
stringBuffer.append("&invitation_code="+MyDbManager.getInstance().dbFindValue());
|
|
stringBuffer.append("&invitation_code="+MyDbManager.getInstance().dbFindValue());
|
|
|
CommonUtil.getInstance()
|
|
CommonUtil.getInstance()
|
|
|
.popShare(activity, stringBuffer.toString() +"", "all");
|
|
.popShare(activity, stringBuffer.toString() +"", "all");
|
|
@@ -655,7 +686,8 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
} else if (PackageUtil.isAppInstalled(SheepApp.mContext, taskEty.getPackage_names())) {
|
|
} else if (PackageUtil.isAppInstalled(SheepApp.mContext, taskEty.getPackage_names())) {
|
|
|
llInfos.addView(getStep("APP下载", "已完成", 0));
|
|
llInfos.addView(getStep("APP下载", "已完成", 0));
|
|
|
llInfos.addView(getStep("完成任务", "进行中", 1));
|
|
llInfos.addView(getStep("完成任务", "进行中", 1));
|
|
|
- } else {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
llInfos.addView(getStep("APP下载", "待完成", 2));
|
|
llInfos.addView(getStep("APP下载", "待完成", 2));
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -936,6 +968,8 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
item_layout.setBackgroundResource(R.drawable.sp_bg_white_solid_top);
|
|
item_layout.setBackgroundResource(R.drawable.sp_bg_white_solid_top);
|
|
|
detail_task_recyclerview.setVisibility(View.GONE);
|
|
detail_task_recyclerview.setVisibility(View.GONE);
|
|
|
ems_game_layout.setVisibility(View.GONE);
|
|
ems_game_layout.setVisibility(View.GONE);
|
|
|
|
|
+ taskdetail_explain_layout.setVisibility(View.GONE);
|
|
|
|
|
+ taskdetail_user_use_layout.setVisibility(View.GONE);
|
|
|
switch (taskEty.getTask_type()){
|
|
switch (taskEty.getTask_type()){
|
|
|
case 1000://连续任务
|
|
case 1000://连续任务
|
|
|
if(taskEty.getChild().size() > 0 && taskEty.getChild().get(0).getDescEntityList() != null){
|
|
if(taskEty.getChild().size() > 0 && taskEty.getChild().get(0).getDescEntityList() != null){
|
|
@@ -943,6 +977,10 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
detail_item_layout_2.setVisibility(View.GONE);
|
|
detail_item_layout_2.setVisibility(View.GONE);
|
|
|
detail_item_layout_3.setVisibility(View.GONE);
|
|
detail_item_layout_3.setVisibility(View.GONE);
|
|
|
detail_task_listview.setVisibility(View.GONE);
|
|
detail_task_listview.setVisibility(View.GONE);
|
|
|
|
|
+
|
|
|
|
|
+ taskdetail_explain_layout.setVisibility(View.VISIBLE);
|
|
|
|
|
+ item_exlpain_title.setText(getString(R.string.supplement_explain_n));
|
|
|
|
|
+ item_exlpain_conetent.setText(getString(R.string.supplement_explain));
|
|
|
sonListviewAdp = new TaskdetailSonListviewAdp(taskEty.getChild(), activity);
|
|
sonListviewAdp = new TaskdetailSonListviewAdp(taskEty.getChild(), activity);
|
|
|
detail_task_recyclerview.setAdapter(sonListviewAdp);
|
|
detail_task_recyclerview.setAdapter(sonListviewAdp);
|
|
|
}
|
|
}
|
|
@@ -953,6 +991,10 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
ems_game_layout.setVisibility(View.VISIBLE);
|
|
ems_game_layout.setVisibility(View.VISIBLE);
|
|
|
detail_shrae_friend_layout.setVisibility(View.GONE);
|
|
detail_shrae_friend_layout.setVisibility(View.GONE);
|
|
|
item_layout.setBackgroundResource(R.drawable.x_shap_shadow_bg_rectgangle_white);
|
|
item_layout.setBackgroundResource(R.drawable.x_shap_shadow_bg_rectgangle_white);
|
|
|
|
|
+ taskdetail_explain_layout.setVisibility(View.VISIBLE);
|
|
|
|
|
+ item_notice.setVisibility(View.VISIBLE);
|
|
|
|
|
+ item_exlpain_title.setText(getString(R.string.warm_prompt_n));
|
|
|
|
|
+ item_exlpain_conetent.setText(getString(R.string.warm_prompt_content));
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
|
|
|
|
@@ -974,6 +1016,58 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
detail_task_recyclerview.setAdapter(sonListviewAdp);
|
|
detail_task_recyclerview.setAdapter(sonListviewAdp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //自动审核
|
|
|
|
|
+ if(taskEty.getInspect_type() == 3){
|
|
|
|
|
+ taskdetail_user_use_layout.setVisibility(View.VISIBLE);
|
|
|
|
|
+
|
|
|
|
|
+ start_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ start_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ down_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ down_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ if (taskEty != null) {
|
|
|
|
|
+ int thisRun = taskEty.getRunTask();
|
|
|
|
|
+ if (thisRun == 1) {//接受了任务
|
|
|
|
|
+ start_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ start_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ if (PackageUtil.isAppInstalled(SheepApp.mContext, taskEty.getPackage_names())) {
|
|
|
|
|
+ down_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ down_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ install_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ install_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ } else if(!TextUtils.isEmpty(PackageUtil.isExistsFile(taskEty.getPackage_names()))){
|
|
|
|
|
+
|
|
|
|
|
+ down_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ down_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+ install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ down_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ down_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //截至时间
|
|
|
|
|
+ if(taskReleaseEty != null && taskReleaseEty.getDemo_time() > 0){
|
|
|
|
|
+ CommonUtil.getInstance().getHashMap(end_of_time_tv);
|
|
|
|
|
+
|
|
|
|
|
+ end_of_time_tv.setVisibility(View.VISIBLE);
|
|
|
|
|
+ SelfCountDownTimer selfCountDownTimer = CommonUtil.getInstance().getCountDownTimer(taskReleaseEty.getDemo_time(), end_of_time_tv, "");
|
|
|
|
|
+ selfCountDownTimer.reset(taskReleaseEty.getDemo_time());
|
|
|
|
|
+ selfCountDownTimer.start();
|
|
|
|
|
+
|
|
|
|
|
+ CommonUtil.getInstance().addTimerHashMap(end_of_time_tv, selfCountDownTimer);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ end_of_time_tv.setVisibility(View.GONE);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1009,4 +1103,10 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ protected void onDestroy() {
|
|
|
|
|
+ super.onDestroy();
|
|
|
|
|
+ CommonUtil.getInstance().cancelAllTimers(CommonUtil.getInstance().timerHashMap);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|