@Override public void requestCallBack(int requestCode, MsMessage msm, String failedReason) { switch (requestCode) { case Constant.querySendTaskList: // T.showShort(activity, msm.getMessage()); Log.w("$%^&", msm.toString()); if (msm.getResult() == 0) { // 成功 taskWaybills = new Gson() .fromJson( msm.getData().toString(), new TypeToken<List<TaskWaybill>>() {}.getType()); getEventBus().post(new TabEvent(1, taskWaybills.size())); pickupAdapter = new PickupAdapter(getActivity(), taskWaybills, Constant.LIST_PICKUP_PICKUPED); allv_pickup.setAdapter(pickupAdapter); allv_pickup.setState(State.TheEnd); } else { T.showShort(activity, msm.getMessage()); } doEmptyCheck(); ptr_pickup.refreshComplete(); hideLoadingDialog(requestCode); isRefreshing = false; break; default: break; } }
@Override public void requestCallBack(int requestCode, MsMessage msm, String failedReason) { // hideLoadingDialog(requestCode); // DialogUtils.hideLoadingDialogAll(); switch (requestCode) { case Constant.querySendingList: Log.w("asd", msm.toString()); if (msm.getResult() == 0) { // 成功 agentReceiveTasks = new Gson() .fromJson( msm.getData().toString(), new TypeToken<List<AgentReceiveTask>>() {}.getType()); getEventBus().post(new SendTabEvent(0, agentReceiveTasks.size())); // if (agentReceiveTasks.size() == 0) { // doEmptyCheck(); // } sendAdapter = new SendAdapter(getActivity(), agentReceiveTasks, Constant.LIST_SEND_PAISONG); allv_send.setAdapter(sendAdapter); allv_send.setState(State.TheEnd); // sendAdapter.updateAll(agentReceiveTasks); } else { T.showShort(activity, msm.getMessage()); } // getEventBus().post(new SendTabEvent(0, agentReceiveTasks.size())); doEmptyCheck(); ptr_send.refreshComplete(); hideLoadingDialog(requestCode); isRefreshing = false; break; default: break; } }