更新主播任务
This commit is contained in:
parent
bf4710470f
commit
d6eddeb130
@ -151,8 +151,9 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||
}
|
||||
|
||||
private Dialog loadDialog;
|
||||
|
||||
private void createTask() {
|
||||
loadDialog= DialogUitl.loadingDialog(getContext());
|
||||
loadDialog = DialogUitl.loadingDialog(getContext());
|
||||
loadDialog.show();
|
||||
LiveNetManager.get(getContext())
|
||||
.getLiveTask(1, liveUid, new HttpCallback<LiveTaskModel>() {
|
||||
@ -161,7 +162,7 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||
Log.i("直播任务", "onSuccess: " + data);
|
||||
updateMainUi(data.getUser());
|
||||
initTabLayout(data);
|
||||
if(loadDialog!=null){
|
||||
if (loadDialog != null) {
|
||||
loadDialog.dismiss();
|
||||
}
|
||||
}
|
||||
@ -169,7 +170,7 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("直播任务", "onError: " + error);
|
||||
if(loadDialog!=null){
|
||||
if (loadDialog != null) {
|
||||
loadDialog.dismiss();
|
||||
}
|
||||
}
|
||||
@ -177,7 +178,7 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||
}
|
||||
|
||||
public void updateLiveTimer(long time) {
|
||||
liveTimer = (int) ((time % (1000 * 60 * 60)) / (1000 * 60));
|
||||
liveTimer = (int) time / (1000 * 60);
|
||||
/*TaskFragment fragment = (TaskFragment) ((AppCompatActivity) mContext).getSupportFragmentManager().findFragmentByTag("f0");
|
||||
if (fragment != null) {
|
||||
fragment.adapter.updateTimer(liveTimer);
|
||||
@ -206,10 +207,10 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||
this.liveUid = getArguments().getString("liveUid", "0");
|
||||
taskList = (RecyclerView) view;
|
||||
initTaskList();
|
||||
if(position==2) {
|
||||
if (position == 2) {
|
||||
createTask(position);
|
||||
}else{
|
||||
update((LiveTaskModel) getArguments().getSerializable("data"),1);
|
||||
} else {
|
||||
update((LiveTaskModel) getArguments().getSerializable("data"), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,8 +256,6 @@ public class LiveTaskDialog extends AbsDialogPopupWindow {
|
||||
for (LiveTaskModel.Task tk : task1) {
|
||||
tk.setNowValue(liveTimer);
|
||||
}
|
||||
task1.get(1).setTaskNum(3);
|
||||
task1.get(1).setTaskName("*" + task1.get(1).getTaskName());
|
||||
}
|
||||
task1.add(task2);
|
||||
task1.addAll(data.getList().get(1));
|
||||
|
@ -62,13 +62,20 @@
|
||||
android:id="@+id/live_data_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="2"
|
||||
tools:listitem="@layout/item_live_data" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/live_data_tip"
|
||||
android:textColor="#808080" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -33,4 +33,5 @@
|
||||
<string name="live_task_item_xp">exp</string>
|
||||
<string name="live_data_msg1">This live data statistics</string>
|
||||
<string name="live_data_msg2">Historical data can be viewed in the anchor center</string>
|
||||
<string name="live_data_tip">* Non-real-time calculation of data</string>
|
||||
</resources>
|
@ -64,4 +64,5 @@
|
||||
<string name="live_task_item_xp">主播經驗</string>
|
||||
<string name="live_data_msg1">本場直播數據統計</string>
|
||||
<string name="live_data_msg2">歷史數據可在主播中心查看</string>
|
||||
<string name="live_data_tip">* 人數及新增相關數據非实时计算</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user