Mais conteúdo relacionado Presentación81. Centro de Estudio Tecnológicos Industrial
& Servicios 109.
Nombre: ADRIANA LIZBETH AVILA ORTIZ.
MARICARMEN AVILA ORTIZ
GRADO & GRUPO: 4° “BM”
PROFESORA: MARGARITA ROMERO
ALVARADO.
MATERIA:DESARROLLAR APLICACIONES
MOVIL.
AULA:31
CICLO ESCOLAR: FEB-JUN 2015.
13. • package com.example.ejemlf_else;
• import android.os.Bundle;
• import android.app.Activity;
• import android.view.Menu;
• import android.widget.TextView;
• public class MainActivity extends Activity {
• @Override
• protected void onCreate(Bundle savedInstanceState) {
• super.onCreate(savedInstanceState);
• setContentView(R.layout.activity_main);
• }
• @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;
14. • }
•
• public void calcular(View v)
• EditText n=(EditText) findViewById (R.id.editText1);
• TextView r=(TextView) findViewById (R.id.textView3);
•
• double d=Double.parseDouble(n.getText().toString();
• if(d<0);
• {
• r.setAccessibilityDelegate(text("Negative");
• }
• else
•
• {
• r.setText("positive");
• }
•
• }
18. • ESTE PROGRAMA NO ES NADA DIFICIL SOLO SIGUE
LOS PASOS Y ENTENDERAS RAPIDAMENTE YA QUE
PUES SI SIGUES LOS PASO NOSE TE ARA TAN
DIFICIL ESTE ESPERO Y TE HAYA GUSTADO ESTE
PROGRAMA.