Java tutorial
/** * Copyright 2013-2014 Elthon Oliveira * * This file is part of SupervisorM for Healthcare Professional software. * * SupervisorM for Healthcare Professional 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. * * SupervisorM for Healthcare Professional 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. * You should have received a copy of the GNU General Public License * along with SupervisorM for Healthcare Professional. * If not, see <http://www.gnu.org/licenses/>. * * Contact: el7hon at gmail dot com */ package br.edu.ufcg.supervisor; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import org.apache.cordova.*; import br.edu.ufcg.supervisor.R; public class MainActivity extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }