@Override
 protected void onCancelled(String s) {
   super.onCancelled(s);
   progressFragment.dismissAllowingStateLoss();
   if (e != null)
     Toast.makeText(WriteWeiboActivity.this, e.getError(), Toast.LENGTH_SHORT).show();
 }
    @Override
    protected void onPreExecute() {
      progressFragment.onCancel(
          new DialogInterface() {

            @Override
            public void cancel() {
              StatusNewTask.this.cancel(true);
            }

            @Override
            public void dismiss() {
              StatusNewTask.this.cancel(true);
            }
          });

      progressFragment.show(getFragmentManager(), "");
    }
 @Override
 protected void onPostExecute(String s) {
   progressFragment.dismissAllowingStateLoss();
   savaDraft();
   finish();
   Toast.makeText(
           WriteWeiboActivity.this, getString(R.string.send_successfully), Toast.LENGTH_SHORT)
       .show();
   super.onPostExecute(s);
 }