Exemplo n.º 1
0
 @Override
 protected void onCancelled(String s) {
   super.onCancelled(s);
   progressFragment.dismissAllowingStateLoss();
   if (e != null)
     Toast.makeText(WriteWeiboActivity.this, e.getError(), Toast.LENGTH_SHORT).show();
 }
Exemplo n.º 2
0
    @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(), "");
    }
Exemplo n.º 3
0
 @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);
 }