コード例 #1
0
ファイル: HttpUIAction.java プロジェクト: BotLibre/BotLibre
 @Override
 protected void onPostExecute(String result) {
   try {
     if (this.dialog != null) {
       this.dialog.dismiss();
     }
     if (this.exception != null) {
       MainActivity.error(this.exception.getMessage(), this.exception, this.activity);
     }
   } catch (Exception exception) {
     Log.wtf("HttpUIAction", exception);
   }
 }
コード例 #2
0
 @Override
 public void onPostExecute(String xml) {
   super.onPostExecute(xml);
   if (this.exception != null) {
     return;
   }
   try {
     ((ChatActivity) this.activity).resetAvatar(this.config);
   } catch (Exception error) {
     this.exception = error;
     MainActivity.error(this.exception.getMessage(), this.exception, this.activity);
     return;
   }
 }
コード例 #3
0
  public void chat(View view) {
    ListView list = (ListView) findViewById(R.id.instancesList);
    int index = list.getCheckedItemPosition();
    if (index < 0) {
      MainActivity.showMessage("Select a channel", this);
      return;
    }
    this.instance = instances.get(index);
    ChannelConfig config = new ChannelConfig();
    config.id = this.instance.id;
    config.name = this.instance.name;

    HttpAction action = new HttpFetchAction(this, config, true);
    action.execute();
  }
コード例 #4
0
  @Override
  public void onPostExecute(String xml) {
    super.onPostExecute(xml);
    if (this.exception != null) {
      return;
    }
    try {
      MainActivity.botMode = botMode;

      ((ChannelBotActivity) this.activity).resetView();
    } catch (Exception error) {
      this.exception = error;
      MainActivity.error(this.exception.getMessage(), this.exception, this.activity);
      return;
    }
  }