Back to project page AndroidAPP-TorEngine.
The source code is released under:
GNU General Public License
If you think the Android project AndroidAPP-TorEngine listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ironwolf.torengine; //w w w .j av a 2 s. c o m import ironwolf.torengine.R; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; public class Chimica extends Activity { final static int CHIM_DIALOG_ID=9; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.chimain); }//fine oncreate @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.sezmenu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id) { /*case R.id.check: { //controlla se ? aggiornato il link di tutti i file di geometria. }break; */ case R.id.quit: { finish(); TorEngineActivity.a.finish(); }break; case R.id.contatti: { showDialog(CHIM_DIALOG_ID); }break; } return true; }; @Override // SWITCH DEL CREATE DELLE ALERT DIALOG protected Dialog onCreateDialog(int id) { Dialog dialog=null; switch(id) { case CHIM_DIALOG_ID: { dialog=createGEOMDialog(); }break; } return dialog; } private Dialog createGEOMDialog() { View view =getLayoutInflater().inflate(R.layout.chimdialog, null); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Sara Nardis"); builder.setView(view); builder.setCancelable(false); builder.setNegativeButton("email", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Intent goToChimC=new Intent(Chimica.this, ChimicaContatti.class); startActivity(goToChimC); } }); builder.setNeutralButton("Sito", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Intent goToSitoGeom= new Intent(Intent.ACTION_VIEW); goToSitoGeom.setData(Uri.parse("http://www.uniroma2.it/didattica/Chimica_1")); startActivity(goToSitoGeom); } }); builder.setPositiveButton("Indietro", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dismissDialog(CHIM_DIALOG_ID); removeDialog(CHIM_DIALOG_ID); } }); AlertDialog alert = builder.create(); return alert; } }