Commit c5cbdffa4028f681c60fb90bbd44bf3c8d796bda
1 parent
d8755a36
数据加载弹窗问题,日期选择问题
Showing
16 changed files
with
44 additions
and
128 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/presenter/RaceListPresenter.java
| @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | ||
| 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; |
| 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 13 | import com.cnlive.moudle.pedometer.net.bean.RunLineInfo; | 13 | import com.cnlive.moudle.pedometer.net.bean.RunLineInfo; |
| 14 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | ||
| 14 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | 15 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 15 | 16 | ||
| 16 | import java.util.HashMap; | 17 | import java.util.HashMap; |
| @@ -29,7 +30,7 @@ public class RaceListPresenter extends MvpBasePresenter<RaceListView> { | @@ -29,7 +30,7 @@ public class RaceListPresenter extends MvpBasePresenter<RaceListView> { | ||
| 29 | map.put("pageNo", pageNo+""); | 30 | map.put("pageNo", pageNo+""); |
| 30 | map.put("state","1"); | 31 | map.put("state","1"); |
| 31 | map.put("pageSize", pageSize+""); | 32 | map.put("pageSize", pageSize+""); |
| 32 | - getView().showLoading(); | 33 | + QMUITipDialogUtil.loadingDialog(context, "正在加载数据", true); |
| 33 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RunLineInfo>>() { | 34 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RunLineInfo>>() { |
| 34 | @Override | 35 | @Override |
| 35 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RunLineInfo>> dataCallback) { | 36 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RunLineInfo>> dataCallback) { |
| @@ -40,7 +41,7 @@ public class RaceListPresenter extends MvpBasePresenter<RaceListView> { | @@ -40,7 +41,7 @@ public class RaceListPresenter extends MvpBasePresenter<RaceListView> { | ||
| 40 | public void onFailure(int code, String message) { | 41 | public void onFailure(int code, String message) { |
| 41 | if (getView() != null) { | 42 | if (getView() != null) { |
| 42 | getView().showErr(message); | 43 | getView().showErr(message); |
| 43 | - getView().hideLoading(); | 44 | + QMUITipDialogUtil.dismessDialog(); |
| 44 | } | 45 | } |
| 45 | } | 46 | } |
| 46 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RunLineInfo>>() { | 47 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RunLineInfo>>() { |
| @@ -48,6 +49,7 @@ public class RaceListPresenter extends MvpBasePresenter<RaceListView> { | @@ -48,6 +49,7 @@ public class RaceListPresenter extends MvpBasePresenter<RaceListView> { | ||
| 48 | public void onSuccess(BaseInfo<RunLineInfo> registerInfo) { | 49 | public void onSuccess(BaseInfo<RunLineInfo> registerInfo) { |
| 49 | if (getView() != null){ | 50 | if (getView() != null){ |
| 50 | getView().onSuccess(registerInfo); | 51 | getView().onSuccess(registerInfo); |
| 52 | + QMUITipDialogUtil.dismessDialog(); | ||
| 51 | } | 53 | } |
| 52 | } | 54 | } |
| 53 | }).start(); | 55 | }).start(); |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/presenter/RaceNameListPresenter.java
| @@ -38,7 +38,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | @@ -38,7 +38,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 38 | map.put("eventId", eventId); | 38 | map.put("eventId", eventId); |
| 39 | map.put("pageNo", pageNo + ""); | 39 | map.put("pageNo", pageNo + ""); |
| 40 | map.put("pageSize", pageSize + ""); | 40 | map.put("pageSize", pageSize + ""); |
| 41 | - getView().showLoading(); | 41 | + QMUITipDialogUtil.loadingDialog(context, "正在加载数据", true); |
| 42 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RaceNameListInfo>>() { | 42 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RaceNameListInfo>>() { |
| 43 | @Override | 43 | @Override |
| 44 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RaceNameListInfo>> dataCallback) { | 44 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RaceNameListInfo>> dataCallback) { |
| @@ -49,7 +49,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | @@ -49,7 +49,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 49 | public void onFailure(int code, String message) { | 49 | public void onFailure(int code, String message) { |
| 50 | if (getView() != null) { | 50 | if (getView() != null) { |
| 51 | getView().showErr(message); | 51 | getView().showErr(message); |
| 52 | - getView().hideLoading(); | 52 | + QMUITipDialogUtil.dismessDialog(); |
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| 55 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RaceNameListInfo>>() { | 55 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RaceNameListInfo>>() { |
| @@ -57,6 +57,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | @@ -57,6 +57,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 57 | public void onSuccess(BaseInfo<RaceNameListInfo> registerInfo) { | 57 | public void onSuccess(BaseInfo<RaceNameListInfo> registerInfo) { |
| 58 | if (getView() != null) { | 58 | if (getView() != null) { |
| 59 | getView().onSuccess(registerInfo); | 59 | getView().onSuccess(registerInfo); |
| 60 | + QMUITipDialogUtil.dismessDialog(); | ||
| 60 | } | 61 | } |
| 61 | } | 62 | } |
| 62 | }).start(); | 63 | }).start(); |
| @@ -71,6 +72,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | @@ -71,6 +72,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 71 | public void delectShoeLine(Context context, int id, int position) { | 72 | public void delectShoeLine(Context context, int id, int position) { |
| 72 | Map<String, String> map = new HashMap<>(); | 73 | Map<String, String> map = new HashMap<>(); |
| 73 | map.put("id", id + ""); | 74 | map.put("id", id + ""); |
| 75 | + QMUITipDialogUtil.loadingDialog(context, "正在删除", false); | ||
| 74 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<ShoeDelectInfo>>() { | 76 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<ShoeDelectInfo>>() { |
| 75 | @Override | 77 | @Override |
| 76 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<ShoeDelectInfo>> dataCallback) { | 78 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<ShoeDelectInfo>> dataCallback) { |
| @@ -81,14 +83,14 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | @@ -81,14 +83,14 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 81 | public void onFailure(int code, String message) { | 83 | public void onFailure(int code, String message) { |
| 82 | if (getView() != null) { | 84 | if (getView() != null) { |
| 83 | getView().showToast(message); | 85 | getView().showToast(message); |
| 84 | - getView().hideLoading(); | 86 | + QMUITipDialogUtil.dismessDialog(); |
| 85 | } | 87 | } |
| 86 | } | 88 | } |
| 87 | }).setSuccessCallback(new SuccessCallback<BaseInfo<ShoeDelectInfo>>() { | 89 | }).setSuccessCallback(new SuccessCallback<BaseInfo<ShoeDelectInfo>>() { |
| 88 | @Override | 90 | @Override |
| 89 | public void onSuccess(BaseInfo<ShoeDelectInfo> baseInfo) { | 91 | public void onSuccess(BaseInfo<ShoeDelectInfo> baseInfo) { |
| 90 | if (getView() != null) { | 92 | if (getView() != null) { |
| 91 | - getView().hideLoading(); | 93 | + QMUITipDialogUtil.dismessDialog(); |
| 92 | if(baseInfo.getData().getIsBind() != null && baseInfo.getData().getIsBind().equals("1")){ | 94 | if(baseInfo.getData().getIsBind() != null && baseInfo.getData().getIsBind().equals("1")){ |
| 93 | getView().delectShoeLine(position); | 95 | getView().delectShoeLine(position); |
| 94 | }else if(baseInfo.getData().getIsBind() != null && baseInfo.getData().getIsBind().equals("-1")){ | 96 | }else if(baseInfo.getData().getIsBind() != null && baseInfo.getData().getIsBind().equals("-1")){ |
| @@ -110,13 +112,12 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | @@ -110,13 +112,12 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 110 | * @param eventId 赛事id | 112 | * @param eventId 赛事id |
| 111 | */ | 113 | */ |
| 112 | public void bindingShoeLine(Context context, int id, String eventId, String fenceId, String fenceName, int position) { | 114 | public void bindingShoeLine(Context context, int id, String eventId, String fenceId, String fenceName, int position) { |
| 113 | - QMUITipDialogUtil.loadingDialog(context, "正在绑定轨迹...", false); | ||
| 114 | Map<String, String> map = new HashMap<>(); | 115 | Map<String, String> map = new HashMap<>(); |
| 115 | map.put("id", id + ""); | 116 | map.put("id", id + ""); |
| 116 | map.put("eventId", eventId); | 117 | map.put("eventId", eventId); |
| 117 | map.put("fenceId", fenceId); | 118 | map.put("fenceId", fenceId); |
| 118 | map.put("fenceName", fenceName); | 119 | map.put("fenceName", fenceName); |
| 119 | - | 120 | + QMUITipDialogUtil.loadingDialog(context, "正在绑定轨迹...", false); |
| 120 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<BindingShoeInfo>>() { | 121 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<BindingShoeInfo>>() { |
| 121 | @Override | 122 | @Override |
| 122 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<BindingShoeInfo>> dataCallback) { | 123 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<BindingShoeInfo>> dataCallback) { |
| @@ -128,7 +129,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | @@ -128,7 +129,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 128 | if (getView() != null) { | 129 | if (getView() != null) { |
| 129 | QMUITipDialogUtil.dismessDialog(); | 130 | QMUITipDialogUtil.dismessDialog(); |
| 130 | getView().showToast(message); | 131 | getView().showToast(message); |
| 131 | - getView().hideLoading(); | 132 | + QMUITipDialogUtil.dismessDialog(); |
| 132 | } | 133 | } |
| 133 | } | 134 | } |
| 134 | }).setSuccessCallback(new SuccessCallback<BaseInfo<BindingShoeInfo>>() { | 135 | }).setSuccessCallback(new SuccessCallback<BaseInfo<BindingShoeInfo>>() { |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/RaceListView.java
| @@ -24,16 +24,11 @@ import java.util.List; | @@ -24,16 +24,11 @@ import java.util.List; | ||
| 24 | public class RaceListView implements MvpView { | 24 | public class RaceListView implements MvpView { |
| 25 | 25 | ||
| 26 | private RaceListFragment fragment; | 26 | private RaceListFragment fragment; |
| 27 | - public QMUITipDialog loadingDiaog; | ||
| 28 | private List<RunLineInfo.ListBean> list = new ArrayList<>(); | 27 | private List<RunLineInfo.ListBean> list = new ArrayList<>(); |
| 29 | private RunListAdapter adapter; | 28 | private RunListAdapter adapter; |
| 30 | 29 | ||
| 31 | public RaceListView(RaceListFragment fragment) { | 30 | public RaceListView(RaceListFragment fragment) { |
| 32 | this.fragment = fragment; | 31 | this.fragment = fragment; |
| 33 | - loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 34 | - .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 35 | - .setTipWord("请稍后") | ||
| 36 | - .create(); | ||
| 37 | } | 32 | } |
| 38 | 33 | ||
| 39 | public void initView(){ | 34 | public void initView(){ |
| @@ -47,7 +42,6 @@ public class RaceListView implements MvpView { | @@ -47,7 +42,6 @@ public class RaceListView implements MvpView { | ||
| 47 | } | 42 | } |
| 48 | 43 | ||
| 49 | public void onSuccess(BaseInfo<RunLineInfo> runLineInfoBaseInfo){ | 44 | public void onSuccess(BaseInfo<RunLineInfo> runLineInfoBaseInfo){ |
| 50 | - hideLoading(); | ||
| 51 | if(fragment.currentPage == 1){ | 45 | if(fragment.currentPage == 1){ |
| 52 | list.clear(); | 46 | list.clear(); |
| 53 | list.addAll(runLineInfoBaseInfo.getData().getList()); | 47 | list.addAll(runLineInfoBaseInfo.getData().getList()); |
| @@ -120,13 +114,4 @@ public class RaceListView implements MvpView { | @@ -120,13 +114,4 @@ public class RaceListView implements MvpView { | ||
| 120 | fragment.binding.empty.show("没有相关数据", "", R.drawable.zhuangtai_kong); | 114 | fragment.binding.empty.show("没有相关数据", "", R.drawable.zhuangtai_kong); |
| 121 | } | 115 | } |
| 122 | 116 | ||
| 123 | - | ||
| 124 | - public void showLoading() { | ||
| 125 | - if (loadingDiaog != null) loadingDiaog.show(); | ||
| 126 | - } | ||
| 127 | - | ||
| 128 | - public void hideLoading() { | ||
| 129 | - if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | } | 117 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/RaceNameListView.java
| @@ -59,7 +59,6 @@ import java.util.List; | @@ -59,7 +59,6 @@ import java.util.List; | ||
| 59 | public class RaceNameListView implements MvpView, OnFenceListener { | 59 | public class RaceNameListView implements MvpView, OnFenceListener { |
| 60 | private final String TAG = "RaceNameListView"; | 60 | private final String TAG = "RaceNameListView"; |
| 61 | RaceNameListFragment fragment; | 61 | RaceNameListFragment fragment; |
| 62 | - public QMUITipDialog loadingDiaog; | ||
| 63 | List<RaceNameListInfo.EventShoeLinesBean> list = new ArrayList<>(); | 62 | List<RaceNameListInfo.EventShoeLinesBean> list = new ArrayList<>(); |
| 64 | private RaceNameListAdapter adapter; | 63 | private RaceNameListAdapter adapter; |
| 65 | private LBSTraceClient mClient = null; | 64 | private LBSTraceClient mClient = null; |
| @@ -69,10 +68,6 @@ public class RaceNameListView implements MvpView, OnFenceListener { | @@ -69,10 +68,6 @@ public class RaceNameListView implements MvpView, OnFenceListener { | ||
| 69 | 68 | ||
| 70 | public RaceNameListView(RaceNameListFragment fragment) { | 69 | public RaceNameListView(RaceNameListFragment fragment) { |
| 71 | this.fragment = fragment; | 70 | this.fragment = fragment; |
| 72 | - loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 73 | - .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 74 | - .setTipWord("请稍后") | ||
| 75 | - .create(); | ||
| 76 | } | 71 | } |
| 77 | 72 | ||
| 78 | 73 | ||
| @@ -118,7 +113,6 @@ public class RaceNameListView implements MvpView, OnFenceListener { | @@ -118,7 +113,6 @@ public class RaceNameListView implements MvpView, OnFenceListener { | ||
| 118 | } | 113 | } |
| 119 | 114 | ||
| 120 | public void onSuccess(BaseInfo<RaceNameListInfo> raceNameListInfoBaseInfo) { | 115 | public void onSuccess(BaseInfo<RaceNameListInfo> raceNameListInfoBaseInfo) { |
| 121 | - hideLoading(); | ||
| 122 | if (fragment.currentPage == 1) { | 116 | if (fragment.currentPage == 1) { |
| 123 | list.clear(); | 117 | list.clear(); |
| 124 | list.addAll(raceNameListInfoBaseInfo.getData().getEventShoeLines()); | 118 | list.addAll(raceNameListInfoBaseInfo.getData().getEventShoeLines()); |
| @@ -313,19 +307,6 @@ public class RaceNameListView implements MvpView, OnFenceListener { | @@ -313,19 +307,6 @@ public class RaceNameListView implements MvpView, OnFenceListener { | ||
| 313 | } | 307 | } |
| 314 | 308 | ||
| 315 | 309 | ||
| 316 | - public void showLoading() { | ||
| 317 | - if (loadingDiaog != null) { | ||
| 318 | - loadingDiaog.show(); | ||
| 319 | - } | ||
| 320 | - } | ||
| 321 | - | ||
| 322 | - public void hideLoading() { | ||
| 323 | - if (loadingDiaog != null) { | ||
| 324 | - loadingDiaog.dismiss(); | ||
| 325 | - } | ||
| 326 | - } | ||
| 327 | - | ||
| 328 | - | ||
| 329 | /** | 310 | /** |
| 330 | * 查询地理围栏 | 311 | * 查询地理围栏 |
| 331 | */ | 312 | */ |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/MyRecordPresenter.java
| @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | ||
| 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; |
| 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 13 | import com.cnlive.moudle.pedometer.net.bean.MyRecordInfo; | 13 | import com.cnlive.moudle.pedometer.net.bean.MyRecordInfo; |
| 14 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | ||
| 14 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | 15 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 15 | 16 | ||
| 16 | import java.util.HashMap; | 17 | import java.util.HashMap; |
| @@ -29,7 +30,7 @@ public class MyRecordPresenter extends MvpBasePresenter<MyRecordView> { | @@ -29,7 +30,7 @@ public class MyRecordPresenter extends MvpBasePresenter<MyRecordView> { | ||
| 29 | map.put("pageNo", pageNo + ""); | 30 | map.put("pageNo", pageNo + ""); |
| 30 | map.put("state", state); | 31 | map.put("state", state); |
| 31 | map.put("pageSize", pageSize + ""); | 32 | map.put("pageSize", pageSize + ""); |
| 32 | - getView().showLoading(); | 33 | + QMUITipDialogUtil.loadingDialog(context, "正在加载数据", true); |
| 33 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<MyRecordInfo>>() { | 34 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<MyRecordInfo>>() { |
| 34 | @Override | 35 | @Override |
| 35 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<MyRecordInfo>> dataCallback) { | 36 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<MyRecordInfo>> dataCallback) { |
| @@ -40,7 +41,7 @@ public class MyRecordPresenter extends MvpBasePresenter<MyRecordView> { | @@ -40,7 +41,7 @@ public class MyRecordPresenter extends MvpBasePresenter<MyRecordView> { | ||
| 40 | public void onFailure(int code, String message) { | 41 | public void onFailure(int code, String message) { |
| 41 | if (getView() != null) { | 42 | if (getView() != null) { |
| 42 | getView().showErr(message); | 43 | getView().showErr(message); |
| 43 | - getView().hideLoading(); | 44 | + QMUITipDialogUtil.dismessDialog(); |
| 44 | } | 45 | } |
| 45 | } | 46 | } |
| 46 | }).setSuccessCallback(new SuccessCallback<BaseInfo<MyRecordInfo>>() { | 47 | }).setSuccessCallback(new SuccessCallback<BaseInfo<MyRecordInfo>>() { |
| @@ -48,6 +49,7 @@ public class MyRecordPresenter extends MvpBasePresenter<MyRecordView> { | @@ -48,6 +49,7 @@ public class MyRecordPresenter extends MvpBasePresenter<MyRecordView> { | ||
| 48 | public void onSuccess(BaseInfo<MyRecordInfo> registerInfo) { | 49 | public void onSuccess(BaseInfo<MyRecordInfo> registerInfo) { |
| 49 | if (getView() != null) { | 50 | if (getView() != null) { |
| 50 | getView().onSuccess(registerInfo); | 51 | getView().onSuccess(registerInfo); |
| 52 | + QMUITipDialogUtil.dismessDialog(); | ||
| 51 | } | 53 | } |
| 52 | } | 54 | } |
| 53 | }).start(); | 55 | }).start(); |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RaceRecorPresenter.java
| @@ -12,6 +12,7 @@ import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | @@ -12,6 +12,7 @@ import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | ||
| 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 13 | import com.cnlive.moudle.pedometer.net.bean.EventRouteRecordBeanVoListBean; | 13 | import com.cnlive.moudle.pedometer.net.bean.EventRouteRecordBeanVoListBean; |
| 14 | import com.cnlive.moudle.pedometer.net.bean.RaceRecordInfo; | 14 | import com.cnlive.moudle.pedometer.net.bean.RaceRecordInfo; |
| 15 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | ||
| 15 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | 16 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 16 | 17 | ||
| 17 | import java.util.ArrayList; | 18 | import java.util.ArrayList; |
| @@ -32,7 +33,7 @@ public class RaceRecorPresenter extends MvpBasePresenter<RaceRecorView> { | @@ -32,7 +33,7 @@ public class RaceRecorPresenter extends MvpBasePresenter<RaceRecorView> { | ||
| 32 | map.put("sid", sid); | 33 | map.put("sid", sid); |
| 33 | map.put("pageNo", pageNo+""); | 34 | map.put("pageNo", pageNo+""); |
| 34 | map.put("pageSize", pageSize+""); | 35 | map.put("pageSize", pageSize+""); |
| 35 | - getView().showLoading(); | 36 | + QMUITipDialogUtil.loadingDialog(context, "正在加载数据", true); |
| 36 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RaceRecordInfo>>() { | 37 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RaceRecordInfo>>() { |
| 37 | @Override | 38 | @Override |
| 38 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RaceRecordInfo>> dataCallback) { | 39 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RaceRecordInfo>> dataCallback) { |
| @@ -43,7 +44,7 @@ public class RaceRecorPresenter extends MvpBasePresenter<RaceRecorView> { | @@ -43,7 +44,7 @@ public class RaceRecorPresenter extends MvpBasePresenter<RaceRecorView> { | ||
| 43 | public void onFailure(int code, String message) { | 44 | public void onFailure(int code, String message) { |
| 44 | if (getView() != null) { | 45 | if (getView() != null) { |
| 45 | getView().showError(message); | 46 | getView().showError(message); |
| 46 | - getView().hideLoading(); | 47 | + QMUITipDialogUtil.dismessDialog(); |
| 47 | } | 48 | } |
| 48 | } | 49 | } |
| 49 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RaceRecordInfo>>() { | 50 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RaceRecordInfo>>() { |
| @@ -51,6 +52,7 @@ public class RaceRecorPresenter extends MvpBasePresenter<RaceRecorView> { | @@ -51,6 +52,7 @@ public class RaceRecorPresenter extends MvpBasePresenter<RaceRecorView> { | ||
| 51 | public void onSuccess(BaseInfo<RaceRecordInfo> registerInfo) { | 52 | public void onSuccess(BaseInfo<RaceRecordInfo> registerInfo) { |
| 52 | if (getView() != null){ | 53 | if (getView() != null){ |
| 53 | getView().setData(registerInfo); | 54 | getView().setData(registerInfo); |
| 55 | + QMUITipDialogUtil.dismessDialog(); | ||
| 54 | } | 56 | } |
| 55 | } | 57 | } |
| 56 | }).start(); | 58 | }).start(); |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RunLinePresenter.java
| 1 | package com.cnlive.moudle.pedometer.frame.presenter; | 1 | package com.cnlive.moudle.pedometer.frame.presenter; |
| 2 | 2 | ||
| 3 | import android.content.Context; | 3 | import android.content.Context; |
| 4 | +import android.util.Log; | ||
| 4 | 5 | ||
| 5 | import com.cnlive.libs.base.logic.Logic; | 6 | import com.cnlive.libs.base.logic.Logic; |
| 6 | import com.cnlive.libs.base.logic.callback.DataCallback; | 7 | import com.cnlive.libs.base.logic.callback.DataCallback; |
| @@ -11,6 +12,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | @@ -11,6 +12,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | ||
| 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | 12 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; |
| 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | 13 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 13 | import com.cnlive.moudle.pedometer.net.bean.RunLineInfo; | 14 | import com.cnlive.moudle.pedometer.net.bean.RunLineInfo; |
| 15 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | ||
| 14 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | 16 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 15 | 17 | ||
| 16 | import java.util.HashMap; | 18 | import java.util.HashMap; |
| @@ -29,7 +31,7 @@ public class RunLinePresenter extends MvpBasePresenter<RunLineView> { | @@ -29,7 +31,7 @@ public class RunLinePresenter extends MvpBasePresenter<RunLineView> { | ||
| 29 | map.put("pageNo", pageNo+""); | 31 | map.put("pageNo", pageNo+""); |
| 30 | map.put("state","0"); | 32 | map.put("state","0"); |
| 31 | map.put("pageSize", pageSize+""); | 33 | map.put("pageSize", pageSize+""); |
| 32 | - getView().showLoading(); | 34 | + QMUITipDialogUtil.loadingDialog(context, "正在加载数据", true); |
| 33 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RunLineInfo>>() { | 35 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RunLineInfo>>() { |
| 34 | @Override | 36 | @Override |
| 35 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RunLineInfo>> dataCallback) { | 37 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RunLineInfo>> dataCallback) { |
| @@ -40,7 +42,7 @@ public class RunLinePresenter extends MvpBasePresenter<RunLineView> { | @@ -40,7 +42,7 @@ public class RunLinePresenter extends MvpBasePresenter<RunLineView> { | ||
| 40 | public void onFailure(int code, String message) { | 42 | public void onFailure(int code, String message) { |
| 41 | if (getView() != null) { | 43 | if (getView() != null) { |
| 42 | getView().showErr(message); | 44 | getView().showErr(message); |
| 43 | - getView().hideLoading(); | 45 | + QMUITipDialogUtil.dismessDialog(); |
| 44 | } | 46 | } |
| 45 | } | 47 | } |
| 46 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RunLineInfo>>() { | 48 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RunLineInfo>>() { |
| @@ -48,6 +50,7 @@ public class RunLinePresenter extends MvpBasePresenter<RunLineView> { | @@ -48,6 +50,7 @@ public class RunLinePresenter extends MvpBasePresenter<RunLineView> { | ||
| 48 | public void onSuccess(BaseInfo<RunLineInfo> registerInfo) { | 50 | public void onSuccess(BaseInfo<RunLineInfo> registerInfo) { |
| 49 | if (getView() != null){ | 51 | if (getView() != null){ |
| 50 | getView().onSuccess(registerInfo); | 52 | getView().onSuccess(registerInfo); |
| 53 | + QMUITipDialogUtil.dismessDialog(); | ||
| 51 | } | 54 | } |
| 52 | } | 55 | } |
| 53 | }).start(); | 56 | }).start(); |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/SelfRecordPresenter.java
| @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | ||
| 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; |
| 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 13 | import com.cnlive.moudle.pedometer.net.bean.SelfRecordInfo; | 13 | import com.cnlive.moudle.pedometer.net.bean.SelfRecordInfo; |
| 14 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | ||
| 14 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | 15 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 15 | 16 | ||
| 16 | import java.util.HashMap; | 17 | import java.util.HashMap; |
| @@ -30,7 +31,7 @@ public class SelfRecordPresenter extends MvpBasePresenter<SelfRecordView> { | @@ -30,7 +31,7 @@ public class SelfRecordPresenter extends MvpBasePresenter<SelfRecordView> { | ||
| 30 | map.put("completeStatus",completeStatus+""); | 31 | map.put("completeStatus",completeStatus+""); |
| 31 | map.put("pageNo", pageNo+""); | 32 | map.put("pageNo", pageNo+""); |
| 32 | map.put("pageSize",pageSize+""); | 33 | map.put("pageSize",pageSize+""); |
| 33 | - getView().showLoading(); | 34 | + QMUITipDialogUtil.loadingDialog(context, "正在加载数据", true); |
| 34 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<SelfRecordInfo>>() { | 35 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<SelfRecordInfo>>() { |
| 35 | @Override | 36 | @Override |
| 36 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<SelfRecordInfo>> dataCallback) { | 37 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<SelfRecordInfo>> dataCallback) { |
| @@ -41,7 +42,7 @@ public class SelfRecordPresenter extends MvpBasePresenter<SelfRecordView> { | @@ -41,7 +42,7 @@ public class SelfRecordPresenter extends MvpBasePresenter<SelfRecordView> { | ||
| 41 | public void onFailure(int code, String message) { | 42 | public void onFailure(int code, String message) { |
| 42 | if (getView() != null) { | 43 | if (getView() != null) { |
| 43 | getView().showError(message); | 44 | getView().showError(message); |
| 44 | - getView().hideLoading(); | 45 | + QMUITipDialogUtil.dismessDialog(); |
| 45 | } | 46 | } |
| 46 | } | 47 | } |
| 47 | }).setSuccessCallback(new SuccessCallback<BaseInfo<SelfRecordInfo>>() { | 48 | }).setSuccessCallback(new SuccessCallback<BaseInfo<SelfRecordInfo>>() { |
| @@ -49,6 +50,7 @@ public class SelfRecordPresenter extends MvpBasePresenter<SelfRecordView> { | @@ -49,6 +50,7 @@ public class SelfRecordPresenter extends MvpBasePresenter<SelfRecordView> { | ||
| 49 | public void onSuccess(BaseInfo<SelfRecordInfo> selfRecordInfoBaseInfo) { | 50 | public void onSuccess(BaseInfo<SelfRecordInfo> selfRecordInfoBaseInfo) { |
| 50 | if (getView() != null){ | 51 | if (getView() != null){ |
| 51 | getView().setData(selfRecordInfoBaseInfo); | 52 | getView().setData(selfRecordInfoBaseInfo); |
| 53 | + QMUITipDialogUtil.dismessDialog(); | ||
| 52 | } | 54 | } |
| 53 | } | 55 | } |
| 54 | }).start(); | 56 | }).start(); |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/TakePartPresenter.java
| @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | @@ -11,6 +11,7 @@ import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | ||
| 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | 11 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; |
| 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | 12 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 13 | import com.cnlive.moudle.pedometer.net.bean.TakePartPeopleInfo; | 13 | import com.cnlive.moudle.pedometer.net.bean.TakePartPeopleInfo; |
| 14 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | ||
| 14 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | 15 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 15 | 16 | ||
| 16 | import java.util.HashMap; | 17 | import java.util.HashMap; |
| @@ -28,7 +29,7 @@ public class TakePartPresenter extends MvpBasePresenter<TakePartView> { | @@ -28,7 +29,7 @@ public class TakePartPresenter extends MvpBasePresenter<TakePartView> { | ||
| 28 | map.put("eventId", eventId); | 29 | map.put("eventId", eventId); |
| 29 | map.put("pageNo", pageNo+""); | 30 | map.put("pageNo", pageNo+""); |
| 30 | map.put("pageSize", pageSize+""); | 31 | map.put("pageSize", pageSize+""); |
| 31 | - if (getView() != null && pageNo ==1) getView().showLoading(); | 32 | + QMUITipDialogUtil.loadingDialog(context, "正在加载数据", true); |
| 32 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<TakePartPeopleInfo>>() { | 33 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<TakePartPeopleInfo>>() { |
| 33 | @Override | 34 | @Override |
| 34 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<TakePartPeopleInfo>> dataCallback) { | 35 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<TakePartPeopleInfo>> dataCallback) { |
| @@ -39,13 +40,16 @@ public class TakePartPresenter extends MvpBasePresenter<TakePartView> { | @@ -39,13 +40,16 @@ public class TakePartPresenter extends MvpBasePresenter<TakePartView> { | ||
| 39 | public void onFailure(int code, String message) { | 40 | public void onFailure(int code, String message) { |
| 40 | if (getView() != null) { | 41 | if (getView() != null) { |
| 41 | getView().showErr(message); | 42 | getView().showErr(message); |
| 42 | - getView().hideLoading(); | 43 | + QMUITipDialogUtil.dismessDialog(); |
| 43 | } | 44 | } |
| 44 | } | 45 | } |
| 45 | }).setSuccessCallback(new SuccessCallback<BaseInfo<TakePartPeopleInfo>>() { | 46 | }).setSuccessCallback(new SuccessCallback<BaseInfo<TakePartPeopleInfo>>() { |
| 46 | @Override | 47 | @Override |
| 47 | public void onSuccess(BaseInfo<TakePartPeopleInfo> takePartPeopleInfoBaseInfo) { | 48 | public void onSuccess(BaseInfo<TakePartPeopleInfo> takePartPeopleInfoBaseInfo) { |
| 48 | - if (getView() != null) getView().onSuccess(takePartPeopleInfoBaseInfo); | 49 | + if (getView() != null) { |
| 50 | + getView().onSuccess(takePartPeopleInfoBaseInfo); | ||
| 51 | + QMUITipDialogUtil.dismessDialog(); | ||
| 52 | + } | ||
| 49 | } | 53 | } |
| 50 | }).start(); | 54 | }).start(); |
| 51 | } | 55 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/MyRecordView.java
| @@ -26,21 +26,15 @@ import java.util.List; | @@ -26,21 +26,15 @@ import java.util.List; | ||
| 26 | public class MyRecordView implements MvpView { | 26 | public class MyRecordView implements MvpView { |
| 27 | 27 | ||
| 28 | private MyRecordFragment fragment; | 28 | private MyRecordFragment fragment; |
| 29 | - public QMUITipDialog loadingDiaog; | ||
| 30 | private List<MyRecordInfo.ListBean> list = new ArrayList<>(); | 29 | private List<MyRecordInfo.ListBean> list = new ArrayList<>(); |
| 31 | private MyRecordAdapter adapter; | 30 | private MyRecordAdapter adapter; |
| 32 | 31 | ||
| 33 | public MyRecordView(MyRecordFragment fragment) { | 32 | public MyRecordView(MyRecordFragment fragment) { |
| 34 | this.fragment = fragment; | 33 | this.fragment = fragment; |
| 35 | - loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 36 | - .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 37 | - .setTipWord("请稍后") | ||
| 38 | - .create(); | ||
| 39 | } | 34 | } |
| 40 | 35 | ||
| 41 | 36 | ||
| 42 | public void onSuccess(BaseInfo<MyRecordInfo> myRecordInfoBaseInfo) { | 37 | public void onSuccess(BaseInfo<MyRecordInfo> myRecordInfoBaseInfo) { |
| 43 | - hideLoading(); | ||
| 44 | if (fragment.currentPage == 1) { | 38 | if (fragment.currentPage == 1) { |
| 45 | list.clear(); | 39 | list.clear(); |
| 46 | list.addAll(myRecordInfoBaseInfo.getData().getList()); | 40 | list.addAll(myRecordInfoBaseInfo.getData().getList()); |
| @@ -126,13 +120,4 @@ public class MyRecordView implements MvpView { | @@ -126,13 +120,4 @@ public class MyRecordView implements MvpView { | ||
| 126 | fragment.binding.refreshLayout.setVisibility(View.GONE); | 120 | fragment.binding.refreshLayout.setVisibility(View.GONE); |
| 127 | fragment.binding.emptyRy.setVisibility(View.VISIBLE); | 121 | fragment.binding.emptyRy.setVisibility(View.VISIBLE); |
| 128 | } | 122 | } |
| 129 | - | ||
| 130 | - | ||
| 131 | - public void showLoading() { | ||
| 132 | - if (loadingDiaog != null) loadingDiaog.show(); | ||
| 133 | - } | ||
| 134 | - | ||
| 135 | - public void hideLoading() { | ||
| 136 | - if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 137 | - } | ||
| 138 | } | 123 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RaceRecorView.java
| @@ -30,17 +30,12 @@ import java.util.List; | @@ -30,17 +30,12 @@ import java.util.List; | ||
| 30 | */ | 30 | */ |
| 31 | public class RaceRecorView implements MvpView { | 31 | public class RaceRecorView implements MvpView { |
| 32 | private RaceRecorFragment fragment; | 32 | private RaceRecorFragment fragment; |
| 33 | - public QMUITipDialog loadingDiaog; | ||
| 34 | private List<EventRouteRecordBeanVoListBean> list = new ArrayList<>(); | 33 | private List<EventRouteRecordBeanVoListBean> list = new ArrayList<>(); |
| 35 | private RaceRecordAdapter adapter; | 34 | private RaceRecordAdapter adapter; |
| 36 | 35 | ||
| 37 | 36 | ||
| 38 | public RaceRecorView(RaceRecorFragment fragment) { | 37 | public RaceRecorView(RaceRecorFragment fragment) { |
| 39 | this.fragment = fragment; | 38 | this.fragment = fragment; |
| 40 | - loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 41 | - .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 42 | - .setTipWord("请稍后") | ||
| 43 | - .create(); | ||
| 44 | } | 39 | } |
| 45 | 40 | ||
| 46 | public void initView() { | 41 | public void initView() { |
| @@ -53,7 +48,6 @@ public class RaceRecorView implements MvpView { | @@ -53,7 +48,6 @@ public class RaceRecorView implements MvpView { | ||
| 53 | } | 48 | } |
| 54 | 49 | ||
| 55 | public void setData(BaseInfo<RaceRecordInfo> raceRecordInfoBaseInfo) { | 50 | public void setData(BaseInfo<RaceRecordInfo> raceRecordInfoBaseInfo) { |
| 56 | - hideLoading(); | ||
| 57 | fragment.binding.ryRecord.setVisibility(View.VISIBLE); | 51 | fragment.binding.ryRecord.setVisibility(View.VISIBLE); |
| 58 | fragment.binding.txAll.setVisibility(View.VISIBLE); | 52 | fragment.binding.txAll.setVisibility(View.VISIBLE); |
| 59 | if (raceRecordInfoBaseInfo.getData().getBestResult() == null) { | 53 | if (raceRecordInfoBaseInfo.getData().getBestResult() == null) { |
| @@ -185,12 +179,4 @@ public class RaceRecorView implements MvpView { | @@ -185,12 +179,4 @@ public class RaceRecorView implements MvpView { | ||
| 185 | AlertUtil.showDeftToast(fragment.getActivity(), msg); | 179 | AlertUtil.showDeftToast(fragment.getActivity(), msg); |
| 186 | } | 180 | } |
| 187 | } | 181 | } |
| 188 | - | ||
| 189 | - public void showLoading() { | ||
| 190 | - if (loadingDiaog != null) loadingDiaog.show(); | ||
| 191 | - } | ||
| 192 | - | ||
| 193 | - public void hideLoading() { | ||
| 194 | - if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 195 | - } | ||
| 196 | } | 182 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RegistrationInfoView.java
| @@ -6,6 +6,7 @@ import com.bumptech.glide.Glide; | @@ -6,6 +6,7 @@ import com.bumptech.glide.Glide; | ||
| 6 | import com.bumptech.glide.load.resource.bitmap.CircleCrop; | 6 | import com.bumptech.glide.load.resource.bitmap.CircleCrop; |
| 7 | import com.bumptech.glide.request.RequestOptions; | 7 | import com.bumptech.glide.request.RequestOptions; |
| 8 | import com.cnlive.libs.base.util.AlertUtil; | 8 | import com.cnlive.libs.base.util.AlertUtil; |
| 9 | +import com.cnlive.media.picker.utils.AlertDialogUtils; | ||
| 9 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | 10 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; |
| 10 | import com.cnlive.moudle.pedometer.model.Constant; | 11 | import com.cnlive.moudle.pedometer.model.Constant; |
| 11 | import com.cnlive.moudle.pedometer.model.MessageEvent; | 12 | import com.cnlive.moudle.pedometer.model.MessageEvent; |
| @@ -119,6 +120,10 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | @@ -119,6 +120,10 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | ||
| 119 | @Override | 120 | @Override |
| 120 | public void onDateSet(TimePickerDialog timePickerView, long millseconds) { | 121 | public void onDateSet(TimePickerDialog timePickerView, long millseconds) { |
| 121 | // 生日(非必填) 未选择 | 122 | // 生日(非必填) 未选择 |
| 122 | - fragment.binding.birthday.setText(DateTimeUtil.formatDateTime(millseconds, "yyyy年MM月dd日")); | 123 | + if(millseconds < System.currentTimeMillis()){ |
| 124 | + fragment.binding.birthday.setText(DateTimeUtil.formatDateTime(millseconds, "yyyy年MM月dd日")); | ||
| 125 | + }else { | ||
| 126 | + AlertUtil.showDeftToast(fragment.getActivity(),"无法选择该日期"); | ||
| 127 | + } | ||
| 123 | } | 128 | } |
| 124 | } | 129 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunLineView.java
| @@ -26,16 +26,11 @@ import java.util.List; | @@ -26,16 +26,11 @@ import java.util.List; | ||
| 26 | public class RunLineView implements MvpView { | 26 | public class RunLineView implements MvpView { |
| 27 | 27 | ||
| 28 | private RunLineFragment fragment; | 28 | private RunLineFragment fragment; |
| 29 | - public QMUITipDialog loadingDiaog; | ||
| 30 | private RunLineAdapter adapter; | 29 | private RunLineAdapter adapter; |
| 31 | private List<RunLineInfo.ListBean> list = new ArrayList<>(); | 30 | private List<RunLineInfo.ListBean> list = new ArrayList<>(); |
| 32 | 31 | ||
| 33 | public RunLineView(RunLineFragment fragment) { | 32 | public RunLineView(RunLineFragment fragment) { |
| 34 | this.fragment = fragment; | 33 | this.fragment = fragment; |
| 35 | - loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 36 | - .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 37 | - .setTipWord("请稍后") | ||
| 38 | - .create(); | ||
| 39 | } | 34 | } |
| 40 | 35 | ||
| 41 | public void initView(){ | 36 | public void initView(){ |
| @@ -48,7 +43,6 @@ public class RunLineView implements MvpView { | @@ -48,7 +43,6 @@ public class RunLineView implements MvpView { | ||
| 48 | } | 43 | } |
| 49 | 44 | ||
| 50 | public void onSuccess(BaseInfo<RunLineInfo> runLineInfoBaseInfo){ | 45 | public void onSuccess(BaseInfo<RunLineInfo> runLineInfoBaseInfo){ |
| 51 | - hideLoading(); | ||
| 52 | if(fragment.currentPage == 1){ | 46 | if(fragment.currentPage == 1){ |
| 53 | list.clear(); | 47 | list.clear(); |
| 54 | list.addAll(runLineInfoBaseInfo.getData().getList()); | 48 | list.addAll(runLineInfoBaseInfo.getData().getList()); |
| @@ -121,12 +115,4 @@ public class RunLineView implements MvpView { | @@ -121,12 +115,4 @@ public class RunLineView implements MvpView { | ||
| 121 | fragment.binding.empty.show("没有相关数据", "", R.drawable.zhuangtai_kong); | 115 | fragment.binding.empty.show("没有相关数据", "", R.drawable.zhuangtai_kong); |
| 122 | } | 116 | } |
| 123 | 117 | ||
| 124 | - | ||
| 125 | - public void showLoading() { | ||
| 126 | - if (loadingDiaog != null) loadingDiaog.show(); | ||
| 127 | - } | ||
| 128 | - | ||
| 129 | - public void hideLoading() { | ||
| 130 | - if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 131 | - } | ||
| 132 | } | 118 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/SelfRecordView.java
| @@ -35,21 +35,15 @@ import q.rorbin.badgeview.QBadgeView; | @@ -35,21 +35,15 @@ import q.rorbin.badgeview.QBadgeView; | ||
| 35 | public class SelfRecordView implements MvpView { | 35 | public class SelfRecordView implements MvpView { |
| 36 | 36 | ||
| 37 | private SelfRecordFragment fragment; | 37 | private SelfRecordFragment fragment; |
| 38 | - public QMUITipDialog loadingDiaog; | ||
| 39 | private List<EventRouteRecordBeanVoListBean> list = new ArrayList<>(); | 38 | private List<EventRouteRecordBeanVoListBean> list = new ArrayList<>(); |
| 40 | private RaceRecordAdapter adapter; | 39 | private RaceRecordAdapter adapter; |
| 41 | 40 | ||
| 42 | 41 | ||
| 43 | public SelfRecordView(SelfRecordFragment fragment) { | 42 | public SelfRecordView(SelfRecordFragment fragment) { |
| 44 | this.fragment = fragment; | 43 | this.fragment = fragment; |
| 45 | - loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 46 | - .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 47 | - .setTipWord("请稍后") | ||
| 48 | - .create(); | ||
| 49 | } | 44 | } |
| 50 | 45 | ||
| 51 | public void setData(BaseInfo<SelfRecordInfo> selfRecordInfoBaseInfo) { | 46 | public void setData(BaseInfo<SelfRecordInfo> selfRecordInfoBaseInfo) { |
| 52 | - hideLoading(); | ||
| 53 | fragment.binding.ryRecord.setVisibility(View.VISIBLE); | 47 | fragment.binding.ryRecord.setVisibility(View.VISIBLE); |
| 54 | fragment.binding.txAll.setVisibility(View.VISIBLE); | 48 | fragment.binding.txAll.setVisibility(View.VISIBLE); |
| 55 | if (selfRecordInfoBaseInfo.getData().getRecordSum() == null) { | 49 | if (selfRecordInfoBaseInfo.getData().getRecordSum() == null) { |
| @@ -204,13 +198,4 @@ public class SelfRecordView implements MvpView { | @@ -204,13 +198,4 @@ public class SelfRecordView implements MvpView { | ||
| 204 | } | 198 | } |
| 205 | } | 199 | } |
| 206 | 200 | ||
| 207 | - public void showLoading() { | ||
| 208 | - if (loadingDiaog != null) loadingDiaog.show(); | ||
| 209 | - } | ||
| 210 | - | ||
| 211 | - public void hideLoading() { | ||
| 212 | - if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 213 | - } | ||
| 214 | - | ||
| 215 | - | ||
| 216 | } | 201 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/TakePartView.java
| @@ -24,16 +24,11 @@ import java.util.List; | @@ -24,16 +24,11 @@ import java.util.List; | ||
| 24 | public class TakePartView implements MvpView { | 24 | public class TakePartView implements MvpView { |
| 25 | 25 | ||
| 26 | private TakePartFragment fragment; | 26 | private TakePartFragment fragment; |
| 27 | - public QMUITipDialog loadingDiaog; | ||
| 28 | private TakePartAdapter adapter; | 27 | private TakePartAdapter adapter; |
| 29 | private List<TakePartPeopleInfo.UserMsgsBean> list = new ArrayList<>(); | 28 | private List<TakePartPeopleInfo.UserMsgsBean> list = new ArrayList<>(); |
| 30 | 29 | ||
| 31 | public TakePartView(TakePartFragment fragment) { | 30 | public TakePartView(TakePartFragment fragment) { |
| 32 | this.fragment = fragment; | 31 | this.fragment = fragment; |
| 33 | - loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 34 | - .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 35 | - .setTipWord("请稍后") | ||
| 36 | - .create(); | ||
| 37 | } | 32 | } |
| 38 | 33 | ||
| 39 | public void initView(){ | 34 | public void initView(){ |
| @@ -47,7 +42,6 @@ public class TakePartView implements MvpView { | @@ -47,7 +42,6 @@ public class TakePartView implements MvpView { | ||
| 47 | } | 42 | } |
| 48 | 43 | ||
| 49 | public void onSuccess(BaseInfo<TakePartPeopleInfo> partPeopleInfoBaseInfo){ | 44 | public void onSuccess(BaseInfo<TakePartPeopleInfo> partPeopleInfoBaseInfo){ |
| 50 | - hideLoading(); | ||
| 51 | if(fragment.currentPage == 1){ | 45 | if(fragment.currentPage == 1){ |
| 52 | list.clear(); | 46 | list.clear(); |
| 53 | list.addAll(partPeopleInfoBaseInfo.getData().getUserMsgs()); | 47 | list.addAll(partPeopleInfoBaseInfo.getData().getUserMsgs()); |
| @@ -114,13 +108,4 @@ public class TakePartView implements MvpView { | @@ -114,13 +108,4 @@ public class TakePartView implements MvpView { | ||
| 114 | fragment.binding.empty.show("暂无参与", "", R.drawable.bmcg_tak); | 108 | fragment.binding.empty.show("暂无参与", "", R.drawable.bmcg_tak); |
| 115 | } | 109 | } |
| 116 | 110 | ||
| 117 | - | ||
| 118 | - public void showLoading() { | ||
| 119 | - if (loadingDiaog != null) loadingDiaog.show(); | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | - public void hideLoading() { | ||
| 123 | - if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 124 | - } | ||
| 125 | - | ||
| 126 | } | 111 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunLineFragment.java
| @@ -4,6 +4,7 @@ package com.cnlive.moudle.pedometer.ui.fragment; | @@ -4,6 +4,7 @@ package com.cnlive.moudle.pedometer.ui.fragment; | ||
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.support.annotation.NonNull; | 5 | import android.support.annotation.NonNull; |
| 6 | import android.support.annotation.Nullable; | 6 | import android.support.annotation.Nullable; |
| 7 | +import android.util.Log; | ||
| 7 | import android.view.View; | 8 | import android.view.View; |
| 8 | 9 | ||
| 9 | import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; | 10 | import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; |
| @@ -43,6 +44,7 @@ public class RunLineFragment extends MvpBindingFragment<RunLineView, RunLinePres | @@ -43,6 +44,7 @@ public class RunLineFragment extends MvpBindingFragment<RunLineView, RunLinePres | ||
| 43 | super.onViewCreated(view, savedInstanceState); | 44 | super.onViewCreated(view, savedInstanceState); |
| 44 | if (getMvpView() != null) getMvpView().initView(); | 45 | if (getMvpView() != null) getMvpView().initView(); |
| 45 | EventBus.getDefault().register(this); | 46 | EventBus.getDefault().register(this); |
| 47 | + Log.e("ssssss", "onViewCreated: "); | ||
| 46 | getPresenter().setData(getActivity(), CommonInfo.getUserId(getActivity()), currentPage, pageSize); | 48 | getPresenter().setData(getActivity(), CommonInfo.getUserId(getActivity()), currentPage, pageSize); |
| 47 | 49 | ||
| 48 | binding.refreshLayout.setOnRefreshListener(v -> { | 50 | binding.refreshLayout.setOnRefreshListener(v -> { |