// Copyright 2012 (C) Matthew Brejza // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. package com.brejza.matt.habmodem; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.MenuItem; import android.support.v4.app.NavUtils; public class FFTActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fft); getActionBar().setDisplayHomeAsUpEnabled(true); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle item selection /* Intent intent; switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); case R.id.status_screen: // intent = new Intent(this, StatusScreen.class); // startActivity(intent); return true; case R.id.map_screen: finish(); return true; default: return super.onOptionsItemSelected(item); } */ if (item.getItemId() == android.R.id.home) NavUtils.navigateUpFromSameTask(this); else if (item.getItemId() == R.id.status_screen) return true; else if (item.getItemId() == R.id.map_screen) { finish(); return true; } return super.onOptionsItemSelected(item); } }