Exemplo n.º 1
0
 @Override
 public void handleMessage(Message msg) {
   super.handleMessage(msg);
   switch (msg.what) {
     case StringUtils.START_GET_BILL_COMMENT_SUCCESSFULLY:
       // App.dismissDialog();
       commentList = BillCommentUtils.getBillCommentList(StringUtils.FRAGMENT_BILL_COMMENT);
       commentAdapter.refresh(commentList);
       srlComment.setRefreshing(false);
       isRefreshing = false;
       break;
     case StringUtils.START_GET_BILL_COMMENT_FAILED:
       Snackbar.make(rvComment, R.string.please_check_your_network, Snackbar.LENGTH_SHORT)
           .show();
       srlComment.setRefreshing(false);
       isRefreshing = false;
       break;
     case StringUtils.START_POST_BILL_COMMENT_SUCCESSFULLY:
       BillCommentUtils.clearList(StringUtils.FRAGMENT_BILL_COMMENT);
       BillCommentUtils.startGetBillCommentTransaction(
           StringUtils.FRAGMENT_BILL_COMMENT, handler, bill.getObjectId());
       App.dismissDialog();
       break;
     case StringUtils.START_POST_BILL_COMMENT_FAILED:
       App.dismissDialog();
       Snackbar.make(rvComment, R.string.please_check_your_network, Snackbar.LENGTH_SHORT)
           .show();
       break;
   }
 }