예제 #1
0
  public void save(View view) {
    ChannelConfig instance = new ChannelConfig();
    saveProperties(instance);

    Spinner spin = (Spinner) findViewById(R.id.typeSpin);
    instance.type = (String) spin.getSelectedItem();

    HttpAction action = new HttpUpdateAction(this, instance);
    action.execute();
  }
예제 #2
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();
  }