Esempio n. 1
0
  @Override
  protected void onListItemClick(ListView l, View v, int position, long id) {
    super.onListItemClick(l, v, position, id);

    try {
      final Connection thisConnection = app.getAllConnections().get(position);

      // set the current connection
      app.setCurrentConnection(thisConnection);

      // go to the connection screen
      Intent intent = new Intent(MainMenu.this, ConnectionDetails.class);
      startActivity(intent);
    } catch (Exception e) {
      Toast.makeText(this, getString(R.string.create_connection), 1500).show();
      e.printStackTrace();
    }
  }