Android Open Source - AndroidAPP-TorEngine Chimica






From Project

Back to project page AndroidAPP-TorEngine.

License

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.

Java Source Code

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;
      
      
      }
}




Java Source Code List

ironwolf.torengine.Aiutare.java
ironwolf.torengine.AlgebraContatti.java
ironwolf.torengine.Algebra.java
ironwolf.torengine.Analisi1Contatti.java
ironwolf.torengine.Analisi1.java
ironwolf.torengine.Analisi2Contatti.java
ironwolf.torengine.Analisi2.java
ironwolf.torengine.Appunti.java
ironwolf.torengine.AutomaticaContatti.java
ironwolf.torengine.Automatica.java
ironwolf.torengine.Banner.java
ironwolf.torengine.ChimicaContatti.java
ironwolf.torengine.Chimica.java
ironwolf.torengine.EconomiaContatti.java
ironwolf.torengine.Economia.java
ironwolf.torengine.FisicaContatti.java
ironwolf.torengine.Fisica.java
ironwolf.torengine.GeomContatti.java
ironwolf.torengine.Geometria.java
ironwolf.torengine.InformaticaContatti.java
ironwolf.torengine.Informatica.java
ironwolf.torengine.Slide.java
ironwolf.torengine.TorEngineActivity.java
ironwolf.torengine.VideoLezioni.java