com.gc.materialdesign.widgets.Dialog Java Examples

The following examples show how to use com.gc.materialdesign.widgets.Dialog. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FeedbackActivity.java    From Social with Apache License 2.0 7 votes vote down vote up
private void handleAddFeedback(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if(root==null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return ;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    Toast.makeText(this,"提交成功",Toast.LENGTH_LONG).show();
    finish();

}
 
Example #2
Source File: SecondNameActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleModifySecondName(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }


    Intent intent = new Intent();
    intent.putExtra("second_name", second_name);
    setResult(RESULT_OK, intent);
    Toast.makeText(this,"修改成功",Toast.LENGTH_LONG).show();
    finish();


}
 
Example #3
Source File: SetAutoReactionActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleSaveAutoReaction(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    AutoReactionRoot root = gson.fromJson(result, AutoReactionRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    et_content.setText(root.content);
    SharedPreferenceUtil.setAutoReaction(root.content);
    Toast.makeText(this,"保存成功",Toast.LENGTH_LONG).show();
    this.finish();
}
 
Example #4
Source File: VipCenterActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleADDetail(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    ADDetailRoot  root = gson.fromJson(result, ADDetailRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this, "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    list_addetail = root.addetail_list;
    for(AdDetail adDetail : list_addetail){
        imageUrls.add(WebUtil.HTTP_ADDRESS + adDetail.ad_path);
    }
    flashView_ad.setImageUris(imageUrls);
}
 
Example #5
Source File: MyEaseChatFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleUpdateMessageCount(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    MessageCountRoot root = gson.fromJson(result, MessageCountRoot.class);

    if (root == null){
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(getActivity(),"Tips",root.message).show();
        return;
    }

    messageCount = root.messageCount;
}
 
Example #6
Source File: VideoCallSettingActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleSaveVideoFeeSetting(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    Toast.makeText(this,"保存成功",Toast.LENGTH_LONG).show();
    this.finish();
}
 
Example #7
Source File: AddRecruitActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
/**
 * 处理新建招聘
 * **/
private void handleAddRecruit(Message msg){
   String  result = msg.obj.toString();
   Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (!root.success){
        if (root.message.equals("未登录")){
            OkhttpUtil.autoLogin(handler);
            return;
        }
        new Dialog(this,"提示",root.message).show();
        return ;
    }

    closeProgressDialog();

    Intent intent = new Intent(this,AddPostActivity.class);
    intent.putExtra("recruit_id", root.recruit_id);
    startActivity(intent);

    Intent broadIntent = new Intent("com.allever.social.updateMyRecruitList");
    sendBroadcast(broadIntent);
    this.finish();

}
 
Example #8
Source File: RecommendFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleADDetail(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    ADDetailRoot  root = gson.fromJson(result, ADDetailRoot.class);

    if (root == null){
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(getActivity(),"Tips",root.message).show();
        return;
    }

    list_addetail = root.addetail_list;
    for(AdDetail adDetail : list_addetail){
        imageUrls.add(WebUtil.HTTP_ADDRESS + adDetail.ad_path);
    }
    flashView_ad.setImageUris(imageUrls);
}
 
Example #9
Source File: UserNewsActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleDeleteNews(Message msg){
    String result = msg.obj.toString();
    Log.d("UserDataActivity", result);
    gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    DeleteNewsRoot root = gson.fromJson(result, DeleteNewsRoot.class);

    if (root == null){
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }
    if (root.success == false){
        new Dialog(this,"Tips",root.messgae).show();
    }else{
        getUserNews();
    }
}
 
Example #10
Source File: MyEaseChatFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleGetMessageCount(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    MessageCountRoot root = gson.fromJson(result, MessageCountRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(getActivity(),"Tips",root.message).show();
        return;
    }

    Log.d("MessageCount", result);
    messageCount = root.messageCount;
    isVip = root.isVip;

}
 
Example #11
Source File: MyShareRankFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleMyShareRank(Message msg){
    String result = msg.obj.toString();
    Log.d("MyShareRankFragment", result);
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (root.success == false){
        new Dialog(getActivity(),"错误",root.message).show();
    }

    tv_sharecount.setText(root.userrank.sharecount+"");
    if (root.userrank.sharecount==0){
        tv_rank.setText("未上榜");
    }else{
        tv_rank.setText("第 " + root.userrank.rank + " 名");
    }
    Glide.with(getActivity()).load(WebUtil.HTTP_ADDRESS + root.userrank.user_head_path).into(iv_head);



}
 
Example #12
Source File: ADBarFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleADDetail(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    ADDetailRoot  root = gson.fromJson(result, ADDetailRoot.class);

    if (root == null){
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(getActivity(),"Tips",root.message).show();
        return;
    }

    list_addetail = root.addetail_list;

    if (list_addetail.size()>0) Glide.with(this).load(WebUtil.HTTP_ADDRESS+list_addetail.get(0).ad_path).into(iv_ad_bar);
    else iv_ad_bar.setImageResource(R.mipmap.ic_ad_bar);


}
 
Example #13
Source File: MineFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleAddPhotoWall(Message msg){
    String result = msg.obj.toString();
    Log.d("ContactFragment", result);
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    AddPhotoWallRoot root = gson.fromJson(result, AddPhotoWallRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }
    if (root.success == false){
        if (root.message.equals("无记录")){
            return;
        }
        if(root.message.equals("未登录")){
            new Dialog(getActivity(),"Tips","未登录").show();
            return;
        }
    }

    list_photo_wall.add(root.new_photo_path);

}
 
Example #14
Source File: RecruitDataActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleDeleteRecruit(Message msg){
    String  result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        if (root.message.equals("未登录")){
            OkhttpUtil.autoLogin(handler);
            return;
        }
        new Dialog(this,"提示",root.message).show();
        return ;
    }
    Intent intent = new Intent("com.allever.social.updateNearbyPost");
    sendBroadcast(intent);

    Intent intent1 = new Intent("com.allever.social.updateMyRecruitList");
    sendBroadcast(intent1);
    finish();
}
 
Example #15
Source File: VideoCallActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleVideoCallMinCount(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    VideoCallMinCountRoot root = gson.fromJson(result, VideoCallMinCountRoot.class);

    if (root == null){
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    video_fee = root.video_fee;
    minCount = root.minCount;
}
 
Example #16
Source File: PocketActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleCredit(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this, "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    tv_balance.setText("当前信用:" + root.credit);
}
 
Example #17
Source File: NewerTaskActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleCredit(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this, "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    tv_credit.setText("当前信用:" + root.credit);



}
 
Example #18
Source File: WithDrawActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleCredit(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    tv_money.setText(root.credit+"");
    tv_credit.setText(root.credit + "");
    credit = root.credit;

}
 
Example #19
Source File: WithDrawActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleAddWithdraw(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    //Toast.makeText(this,"已提交",Toast.LENGTH_LONG).show();
    new Dialog(this,"提示","已提交,预计1-3个工作日内到账").show();
    et_account.setText("");
    et_money.setText("");
    tv_credit.setText(root.credit+"");
    tv_money.setText(root.credit+"");
    credit = root.credit;
}
 
Example #20
Source File: LoginActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.login_layout);

    initView();

    initData();

    if (force_logout!=null){
        Dialog dialog = new Dialog(this,"提示","该账号在其他设备登录");
        dialog.show();
    }

    startLocationService();
}
 
Example #21
Source File: RecruitItemBaseAdapter.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleDeleteRecruit(Message msg){
    String result = msg.obj.toString();
    Log.d("RecruitItemBase", result);
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if(root==null){
        new Dialog(context,"错误","链接服务器失败").show();
        return ;
    }
    if (root.success == false){
        new Dialog(context,"错误",root.message).show();
    }

    final Dialog dialog = new Dialog(context,"Tips","删除成功");
    dialog.setOnAcceptButtonClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent intent = new Intent("com.allever.social.updateNearbyRecruit");
            context.sendBroadcast(intent);
            dialog.cancel();
        }
    });
    dialog.show();
}
 
Example #22
Source File: NearbyUserItemAdapter.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleGetCredit(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if(root==null){
        new Dialog(context,"错误","链接服务器失败").show();
        return ;
    }

    if (!root.success){
        new Dialog(context,"Tips",root.message).show();
        return;
    }

    if (root.credit > 0){

    }else{

    }


}
 
Example #23
Source File: NearbyUserFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleSaveVideoCall(Message msg){
    String result = msg.obj.toString();
    Log.d("NearbyUserFragment", result);
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    VideoCallSettingRoot root = gson.fromJson(result, VideoCallSettingRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (root.success == false){
        new Dialog(getActivity(),"错误",root.message).show();
    }

    page = 1;
    getNearbyUser();
}
 
Example #24
Source File: NearbyUserFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleADSetting(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    ADSettingRoot  root = gson.fromJson(result, ADSettingRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(getActivity(),"Tips",root.message).show();
        return;
    }
}
 
Example #25
Source File: NearbyUserFragment.java    From Social with Apache License 2.0 6 votes vote down vote up
private void handleCheckVideoCall(Message msg){
    String result = msg.obj.toString();
    Log.d("NearbyUserFragment", result);
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    CheckVideoCallRoot root = gson.fromJson(result, CheckVideoCallRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(getActivity(), "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (root.success == false){
        new Dialog(getActivity(),"错误",root.message).show();
    }

    video_fee = root.video_fee + "";
}
 
Example #26
Source File: ChooseFriendGroupActivity.java    From Social with Apache License 2.0 5 votes vote down vote up
/**
 * 处理获取分组列表
 * **/
private void handleGetFriendGroupNameList(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if(root==null){
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return ;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    list_friendgroupnameItem.clear();
    FriendGroupNameItem friendGroupNameItem;
    for(FriendGroup friendGroup : root.list_friendgroup){
        friendGroupNameItem = new FriendGroupNameItem();
        friendGroupNameItem.setId(friendGroup.id);
        friendGroupNameItem.setFriendgroup_name(friendGroup.friendgroup_name);
        list_friendgroupnameItem.add(friendGroupNameItem);
    }

    friendGroupNameBaseAdapter = new FriendGroupNameBaseAdapter(this,list_friendgroupnameItem);
    listView.setAdapter(friendGroupNameBaseAdapter);

}
 
Example #27
Source File: MyRecruitActivity.java    From Social with Apache License 2.0 5 votes vote down vote up
private void handleMyRecruitList(Message msg){
    String result = msg.obj.toString();

    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if(root==null){
        new Dialog(this,"错误","链接服务器失败").show();
        return ;
    }
    if (root.success == false){
        new Dialog(this,"错误",root.message).show();
    }

    list_myRecruitItem.clear();
    MyRecruitItem myRecruitItem;
    for(Recruit recruit : root.list_recruit){
        myRecruitItem = new MyRecruitItem();
        myRecruitItem.setId(recruit.id);
        myRecruitItem.setCompanyname(recruit.companyname);
        myRecruitItem.setUser_head_path(recruit.user_head_path);
        myRecruitItem.setUser_id(recruit.user_id);
        myRecruitItem.setDate(recruit.date);
        myRecruitItem.setRequirement(recruit.requirement);
        list_myRecruitItem.add(myRecruitItem);
    }

    myRecruitItemBaseAdapter  = new MyRecruitItemBaseAdapter(this,list_myRecruitItem);
    listView.setAdapter(myRecruitItemBaseAdapter);
    listView.setOnItemClickListener(this);

}
 
Example #28
Source File: VideoCallSettingActivity.java    From Social with Apache License 2.0 5 votes vote down vote up
private void handleGetVideoFeeSetting(Message msg){
    String result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        new Dialog(this,"Tips",root.message).show();
        return;
    }

    if(root.fee.accept_video==1){
        aSwitch_accept_video.setChecked(true);
    }else{
        aSwitch_accept_video.setChecked(false);
    }

    if (aSwitch_accept_video.isCheck()) accept_video = "1";
    else accept_video = "0";
    video_fee = root.fee.video_fee+"";

    tv_video_call_fee.setText(root.fee.video_fee + " 信用/分钟");

}
 
Example #29
Source File: UserDataDetailActivity.java    From Social with Apache License 2.0 5 votes vote down vote up
private void handlePhotoWallList(Message msg){
    String result = msg.obj.toString();
    Log.d("ContactFragment", result);
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    PhotoWallListRoot root = gson.fromJson(result, PhotoWallListRoot.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this,"服务器繁忙,请重试",Toast.LENGTH_LONG).show();
        return;
    }
    if (root.success == false){
        if (root.message.equals("无记录")){
            return;
        }
        if(root.message.equals("未登录")){
            new Dialog(this,"Tips","未登录").show();
            return;
        }
    }

    //to do
    list_photo_wall = new ArrayList<>();
    for(String path: root.photowalllist){
        list_photo_wall.add(WebUtil.HTTP_ADDRESS + path);
    }
    if(root.photowalllist.size()==0){
        list_photo_wall.add(SharedPreferenceUtil.getUserHeadPath(username));
    }
    photoWallImgBaseAdapter = new PhotoWallImgBaseAdapter(this,list_photo_wall);
    gridview.setAdapter(photoWallImgBaseAdapter);


}
 
Example #30
Source File: AddPostActivity.java    From Social with Apache License 2.0 5 votes vote down vote up
private void handleAddPost(Message msg){
    String  result = msg.obj.toString();
    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
    Root root = gson.fromJson(result, Root.class);

    if (root == null){
        //new Dialog(this,"错误","链接服务器失败").show();
        Toast.makeText(this, "服务器繁忙,请重试", Toast.LENGTH_LONG).show();
        return;
    }

    if (!root.success){
        if (root.message.equals("未登录")){
            OkhttpUtil.autoLogin(handler);
            return;
        }
        new Dialog(this,"提示",root.message).show();
        return ;
    }

    final Dialog dialog = new Dialog(this,"Tips", "添加成功.");
    dialog.setOnAcceptButtonClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            dialog.dismiss();
            Intent intent = new Intent("com.allever.social.updateNearbyPost");
            sendBroadcast(intent);
            AddPostActivity.this.finish();
        }
    });

    dialog.show();
}