@Override protected void onHomeSelected() { Intent intent = IntentUtils.newIntent(this, MarkerListActivity.class) .putExtra(MarkerListActivity.EXTRA_TRACK_ID, waypoint.getTrackId()); startActivity(intent); finish(); }
@Override public boolean onOptionsItemSelected(MenuItem item) { Intent intent; switch (item.getItemId()) { case R.id.marker_detail_show_on_map: intent = IntentUtils.newIntent(this, TrackDetailActivity.class) .putExtra(TrackDetailActivity.EXTRA_MARKER_ID, markerId); startActivity(intent); return true; case R.id.marker_detail_edit: intent = IntentUtils.newIntent(this, MarkerEditActivity.class) .putExtra(MarkerEditActivity.EXTRA_MARKER_ID, markerId); startActivity(intent); return true; case R.id.marker_detail_delete: DeleteMarkerDialogFragment.newInstance(new long[] {markerId}) .show(getSupportFragmentManager(), DeleteMarkerDialogFragment.DELETE_MARKER_DIALOG_TAG); return true; default: return super.onOptionsItemSelected(item); } }