@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.meeting); meetingId = getIntent().getIntExtra("id", -1); if (meetingId != -1) MeetingsController.getMeeting(MeetingActivity.this, meetingId); else Toast.makeText(MeetingActivity.this, "Something wrong", Toast.LENGTH_SHORT).show(); listParticipants = ((ListView) findViewById(R.id.metListViewParticipants)); findViewById(R.id.metButtonDelete) .setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { MeetingsController.deleteMeeting(MeetingActivity.this, meetingId); } }); findViewById(R.id.metButtonAccept) .setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { MeetingsController.acceptUser( MeetingActivity.this, meetingId, UserController.newInstance(MeetingActivity.this).getLogIn()); } }); }
public void updateParticipants() { if (meetingId != -1) MeetingsController.getMeeting(MeetingActivity.this, meetingId); }