Ejemplo n.º 1
0
 @Override
 public void onOffline() {
   DialogTips dialog = new DialogTips(this, "您的账号已在其他设备上登录!", "重新登录");
   // 设置成功事件
   dialog.SetOnSuccessListener(
       new DialogInterface.OnClickListener() {
         public void onClick(DialogInterface dialogInterface, int userId) {
           YuApplication.getInstance().logout();
           startActivity(new Intent(ChatActivity.this, LoginActivity.class));
           finish();
           dialogInterface.dismiss();
         }
       });
   // 显示确认对话框
   dialog.show();
   dialog = null;
 }
Ejemplo n.º 2
0
 /**
  * 显示重发按钮 showResendDialog @Title: showResendDialog
  *
  * @param @param recent
  * @return void
  * @throws
  */
 public void showResendDialog(final View parentV, View v, final Object values) {
   DialogTips dialog = new DialogTips(this, "确定重发该消息", "确定", "取消", "提示", true);
   // 设置成功事件
   dialog.SetOnSuccessListener(
       new DialogInterface.OnClickListener() {
         public void onClick(DialogInterface dialogInterface, int userId) {
           if (((BmobMsg) values).getMsgType() == BmobConfig.TYPE_IMAGE
               || ((BmobMsg) values).getMsgType() == BmobConfig.TYPE_VOICE) { // 图片和语音类型的采用
             resendFileMsg(parentV, values);
           } else {
             resendTextMsg(parentV, values);
           }
           dialogInterface.dismiss();
         }
       });
   // 显示确认对话框
   dialog.show();
   dialog = null;
 }