Introducción a Android
1.- ¿Qué es un sistema operativo para aplicaciones móviles?
a) Una aplicación para programas
b b) .Es el programa principal que coordina todos los programas y aplicaciones.
c c) Un hardware de aplicación para dispositivos móviles
d d) La aplicación principal
2.- ¿En que se basa Android?
a a) .En el kernel de Linux es de código abierto
b b) No se sabe
c c) Una relación de programas diversos
d d) De una compilación de distintos programas
3.- ¿Cuál es la finalidad de kernel de Linux?
a a) Ver como es un programa completo
b) .Es fomentar el desarrollo de aplicaciones móviles
c c) Fomentar el aprendizaje
d d) Ser una grande empresa
4.- ¿Quién desarrollo Android y cuando fue su lanzamiento?
a a) En 2005 fue presentado con la fundación del Open Handset Alliance
b b) Android fue presentado en 2006 por un consorcio de compañías de hardware, software y telecomunicaciones
c c) .Fue presentado en 2007 por Android Inc
d d) En 2003 por Open Handset Alliance
5.- ¿Cuándo la multinacional Google compra a Android Inc?
a a) En mayo 2006
b b) En septiembre del 2007
c c) En noviembre del 2006
d d) .En julio de 2005
6.- ¿Que se anuncio es mismo día?
a a) .La primera versión del sistema operativo: Android 1.0 Apple Pie.
b b) Un nuevo presidente de la compañía
c) Un nuevo prototipo llamado Android 1.1
d d) Un proyecto a desarrollar para dispositivos moviles.
7.- ¿Cuál es la constante en los nombres de prototipos Android?
a a) Nombres de postres en ingles con un orden alfabético.
b b) Nombres de objetos de casa en ingles
c c) Objetos en orden alfabetico
d d) No se sabe
8.- ¿Cupcake porque se caracteriza?
a a) Widgets, animaciones en pantalla, teclado QWERTY, copiar y pegar, rotación de pantalla y subidas a youtube.
b b) Interfaz de cámara, búsqueda por voz, Google maps y Android market
c c) Mejora en Google Maps, un salva pantallas animado y zoom digital y navegador
d d) Hotspot Wifi, mejoría en la memoria, velocidad, Microsoft Echange, Video llamada .
9.- ¿Gingerbread porque se caracteriza?
a) Hotspot Wifi, mejoría en la memoria, velocidad, Microsoft Echange, Video llamada
b b) Version especial para tabletas, soporte flash y divx, dolphin-juegos
c c) Interfaz de cámara, búsqueda por voz, Google maps y Android market
d d) Duración en la batería, mayor soporte en video, compatibilidad con NFC y mejora en video juegos.
10.- ¿Ice Cream Sandwich porque se caracteriza?
a a) Hotspot Wifi, mejoría en la memoria, velocidad, Microsoft Echange, Video llamada
b b) Interfaz de cámara, búsqueda por voz, Google maps y Android market
c c) Personalizacion, multiplataformna, barras de estado, soporte 3D y USB, reconocimiento facial y control PS3.
d d) Duración en la batería, mayor soporte en video, compatibilidad con NFC y mejora en video juegos.
11.- ¿Jelly Bean porque se caracteriza?
a a) Google Now, notificaciones accesible, varias cuentas de usuario.
b b) Por ser mas fácil
c c) Por la rápida cámara
12.- ¿Kitkat porque se caracteriza?
a a) Comando de voz “Ok google”, quick office, google drive y box.
b b) Por la velocidad
c c) La calidad y el precio
13.- ¿Lollipop porque se caracteriza?
a a) Version para tabletas móviles, tabletas, relojes, televisores y automóviles., mayor atractivo visual, mas seguridad.
b b) Por no tener un software
c c) Por ser mas lento
14.- ¿Marshmallow porque se caraceriza?
a a) Now on tap, sistema de energía Doze, nuevos permisos para aplicaciones.
b b) Por tener muchas herramientas de configuración
c c) Por tener un softare muy rapido
15.- ¿Nougat porque se caracteriza?
a a) Multilenguaje, vista multiventana, realidad virtuañ, Doze on the Go, economizador de datos.
e b) Lenguaje en ingles
f c) Objetos en orden alfabetico
g d) No se sabe
16.- ¿Donut porque se caracteriza?
a a) Multilenguaje, vista multiventana, realidad virtuañ, Doze on the Go, economizador de datos.
e b) Lenguaje en ingles
f c) Objetos en orden alfabetico
g d) No se sabe
17.- ¿Éclair porque se caracteriza?
a) Mejora en Google Maps, un salva pantallas animado y zoom digital y navegador
b b) Ser muy lento
c c) Tener un navegador unico
18.- características principales de android
a a) Multitasking, compatible con varios hadware, tiene google play, actualizaciones, operaciones
b b) No tiene anuncios sus aplicaciones
c c) Ser muy eficientes
19.- como es la arquitectura de android?
a a) En capaz
b b) Dibujos
c c) Códigos
20.- cuando se lanzó android beta?
a a) Noviembre 2007
b b) Diciembre 2005
c c) Enero 2007
d d) Enero 2005
SISTEMA OPERATIVOS PARA DISPOSITIVOS MOVILES
- 1- ¿QUÉ ES UN SISTEMA OPERATIVO MOVIL?
Es un software que gestiona los recursos del hardware y provee servicios a los programas y aplicaciones.
2 2- LOS SISTEMAS OPERATIVOS PORQUE ESTAN CONSTITUIDOS:
Kernel, middleware, entorno de ejecución e interfaz de usuario.
3 3- ¿QUE ES EL KERNEL?
Es la parte central o corazón de cualquier sistema operativo y proporcionar los distintitos elementos al hardware.
4 4- ¿EN KERNEL QUE SE ENCUENTRAN?
Los drivers que controlan los componentes para el hardware, la gestión de procesos y el sistema de archivos de la memoria
5 5- ¿QUÉ ES MIDDLEWARE?
Es un software que se sitúa entre el sistema operativo y las aplicaciones que se ejecutan en él.
6 6- ¿CÓMO FUNCIONA?
Como una capa de transmisión que permite la comunicación de datos.
7 7- QUÉ PERMITE MIDDLEWARE?
Permite que los datos de una base de datos de una base de datos puedan ser accedidos a través de otra ahorrando tiempo a los programas.
8 8- ¿CÓMO ESTA CONSTITUIDA EL ENTORNO DE EJECUCION?
´por un gestor de aplicaciones y por un conjunto de base programables cubiertas.
9 9- ¿QUÉ ES LA INTERFAZ DE USUARIO?
Es el mecanismo por el cual se muestra el diseño de la presentación visual de la aplicación que el usuario interactúa con el sistema
1 10- ¿QUÉ INCLUYE?
Componentes gráficos como botones, pantallas y listas
1 11- ¿CON CUANTOS AÑOS LLEVA LA EVOLUCION DE DISPOSITIVOS?
Más de 2 décadas.
1 12- ¿CUÁL FUE EL PRIMER SISTEMA OPERATIVO MOVIL?
Palm os 1.0 en 1996
1 13- ¿QUÉ APARECIO EN 1999?
Las terminales pager incursionando con BlackBerry os que permita acceso a cuantas de correo electrónico y navegador.
1 14- ¿EN EL AÑO 2000 QUE LANZO MICROSOFT?
El pocket pc2000 qué soporto messenger y mirrial player play en hean you a.
1 15- ¿QUE NACED EN 2001?
Nace Symbian y en la alianza de diferentes compañías móviles Nokia, Sony Erickson, Samsung, Motorola., etc. con el objetivo de competir con los demás sistemas operativos móviles.
1 16- ¿QUÉ SE LANZO EN 2007?
Apple lanzo el primer IPhone os para dispositivos móviles iTouch, iPhone, iPod.
1 17- ¿EN 2008 QUE LANZO GOOGLE?
Lanzo su primer dispositivo androide, que ha marcado tendencia y más empleados por múltiples empresas, por tanto es el más utilizado en la actualidad.
1 18- ¿CUÁLES SON LOS PRINCIPALES SISTEMAS OPERATIVOS MOVILES?
Google android, iOS Apple, windows phone, blackberry OS y Firefox OS
1 19- ¿EN QUE VA ENFOCADO GOOGLE ANDROID?
Enfocado a teléfonos táctiles, con un kernel de Linux en sus entrañas y con una máquina virtual java. No es libre al 100% pero si permite realizar modificaciones a su código. Es el más utilizado en la actualidad.
2 20- ¿EN QUE CONSISTE iOS DE APPLE?
Derivado del sistemas mack OSK, es un sistema operativo iUMIX, actualmente es el sistema operativo con segundo lugar en el mundo.
2 21- ¿DE QUE ES EL RESULTADO DE WINDOWS PHONE?
De una evolución constante del sistema operativo Windows Mobil. Microsoft ofrece una interfaz de uso que integra varios de sus servicios activos.
2 22- ¿EN QUE CONSISTE BLACK BERRY OS?
Sistema operativo de multitarea escrito en c++ y java., es propiedad de la empresa RIM. Recientemente se han actualizado para competir con Android y iOS.
2 23- ¿QUÉ OCURRE CON FIREFOX?
Sistema operativo que se encuentra en fase de desarrollo y que ha surgido en los mercados emergentes, de gama baja.
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void restar(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int resta=nro1-nro2;
String resu=String.valueOf(resta);
tv3.setText(resu);
}
}
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void sumar(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int suma=nro1+nro2;
String resu=String.valueOf(suma);
tv3.setText(resu);
}
}
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void multiplicar(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int multiplicacion=nro1*nro2;
String resu=String.valueOf(multiplicion);
tv3.setText(resu);
}
}
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void dividir(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int division=nro1/nro2;
String resu=String.valueOf(division);
tv3.setText(resu);
}
}
package com.example.programa5;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
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;
}
public void Resultado(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
EditText et3=(EditText)findViewById(R.id.et3);
float sueldo=Float.parseFloat(et1.getText().toString());
float iva=(float)(sueldo*0.16);
et2.setText(String.valueOf(iva));
float res=sueldo-iva;
et3.setText(String.valueOf(res));
}
}
COMPONENTES A UTILIZAR: ( TextView, EditText, Button, RadioButton ).
package com.example.programa;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.RadioButton;
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;
}
public void operar(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
TextView tv3=(TextView)findViewById(R.id.tv3);
RadioButton radio0=(RadioButton)findViewById(R.id.radio0);
RadioButton radio1=(RadioButton)findViewById(R.id.radio1);
int nro1=Integer.parseInt(et1.getText().toString());
int nro2=Integer.parseInt(et2.getText().toString());
if (radio0.isChecked()==true) {
int suma=nro1+nro2;
String resu=String.valueOf(suma);
tv3.setText(resu);
} else
if (radio1.isChecked()==true) {
int resta=nro1-nro2;
String resu=String.valueOf(resta);
tv3.setText(resu);
}
}
}
package com.example.programa7;
import com.example.programa7.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.CheckBox;
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;
}
public void Resultado(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
EditText et3=(EditText)findViewById(R.id.et3);
CheckBox checkBox1=(CheckBox)findViewById(R.id.checkBox1);
CheckBox checkBox2=(CheckBox)findViewById(R.id.checkBox2);
CheckBox checkBox3=(CheckBox)findViewById(R.id.checkBox3);
int nro1=Integer.parseInt(et1.getText().toString());
int nro2=Integer.parseInt(et2.getText().toString());
if (checkBox1.isChecked()==true) {
int suma=nro1+nro2;
String resu=String.valueOf(suma);
et3.setText(resu);
}
else
if (checkBox2.isChecked()==true) {
int resta=nro1-nro2;
String resu=String.valueOf(resta);
et3.setText(resu);
}
else
if (checkBox3.isChecked()==true) {
int mul=nro1*nro2;
String resu=String.valueOf(mul);
et3.setText(resu);
}
}
}
COMPONENTES A UTILIZAR: ( TextView, EditText, Button, Spinner).
package com.example.programa8_bis;
import com.example.programa8_bis.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Spinner;
import android.widget.ArrayAdapter;
public class MainActivity extends Activity {
private Spinner spinner1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
spinner1 = (Spinner) findViewById(R.id.spinner1);
String []opciones={"sumar","restar","multiplicar","dividir"};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, opciones);
spinner1.setAdapter(adapter);
}
@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;
}
public void operar(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
TextView tv3=(TextView)findViewById(R.id.tv3);
int nro1=Integer.parseInt(et1.getText().toString());
int nro2=Integer.parseInt(et2.getText().toString());
String selec=spinner1.getSelectedItem().toString();
if (selec.equals("sumar")) {
int suma=nro1+nro2;
String resu=String.valueOf(suma);
tv3.setText(resu);
}
else
if (selec.equals("restar")) {
int resta=nro1-nro2;
String resu=String.valueOf(resta);
tv3.setText(resu);
}
else
if (selec.equals("multiplicar")) {
int multi=nro1*nro2;
String resu=String.valueOf(multi);
tv3.setText(resu);
}
else
if (selec.equals("dividir")) {
int divi=nro1/nro2;
String resu=String.valueOf(divi);
tv3.setText(resu);
}
}
}
Practica "Hola mundo"
package com.android.paquete;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class ProyectoAndroid1Activity extends Activity {
/** Called when the activity is first created. *
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState)
String var = "Hola mundo, esta es una aplicacion para Android";
TextView vista;
vista = new TextView(this);
this.setTitle("Aplicacion de Jorge");
vista.setText(var);
setContentView(vista);
}
}
Practica 1 Sustracción de númerosimport android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void restar(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int resta=nro1-nro2;
String resu=String.valueOf(resta);
tv3.setText(resu);
}
}
Practica 2 Suma de dos números
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void sumar(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int suma=nro1+nro2;
String resu=String.valueOf(suma);
tv3.setText(resu);
}
}
Practica 3 Multiplicación de dos números
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void multiplicar(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int multiplicacion=nro1*nro2;
String resu=String.valueOf(multiplicion);
tv3.setText(resu);
}
}
Practica 4 División de dos números
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv3=(TextView)findViewById(R.id.tv3);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
//Este método se ejecutará cuando se presione el botón
public void dividir(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int division=nro1/nro2;
String resu=String.valueOf(division);
tv3.setText(resu);
}
}
Practica 5 Calcule el sueldo final de un trabajador
COMPONENTES A UTILIZAR: ( TextView, EditText, Button ).
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
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;
}
public void Resultado(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
EditText et3=(EditText)findViewById(R.id.et3);
float sueldo=Float.parseFloat(et1.getText().toString());
float iva=(float)(sueldo*0.16);
et2.setText(String.valueOf(iva));
float res=sueldo-iva;
et3.setText(String.valueOf(res));
}
}
Practica 6 Operaciones aritmética utilizando RadioButton
COMPONENTES A UTILIZAR: ( TextView, EditText, Button, RadioButton ).
package com.example.programa;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.RadioButton;
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;
}
public void operar(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
TextView tv3=(TextView)findViewById(R.id.tv3);
RadioButton radio0=(RadioButton)findViewById(R.id.radio0);
RadioButton radio1=(RadioButton)findViewById(R.id.radio1);
int nro1=Integer.parseInt(et1.getText().toString());
int nro2=Integer.parseInt(et2.getText().toString());
if (radio0.isChecked()==true) {
int suma=nro1+nro2;
String resu=String.valueOf(suma);
tv3.setText(resu);
} else
if (radio1.isChecked()==true) {
int resta=nro1-nro2;
String resu=String.valueOf(resta);
tv3.setText(resu);
}
}
}
Practica 7 Operaciones aritmética utilizando Checkbox
COMPONENTES A UTILIZAR: ( TextView, EditText, Button, checkBox)
package com.example.programa7;
import com.example.programa7.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.CheckBox;
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;
}
public void Resultado(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
EditText et3=(EditText)findViewById(R.id.et3);
CheckBox checkBox1=(CheckBox)findViewById(R.id.checkBox1);
CheckBox checkBox2=(CheckBox)findViewById(R.id.checkBox2);
CheckBox checkBox3=(CheckBox)findViewById(R.id.checkBox3);
int nro1=Integer.parseInt(et1.getText().toString());
int nro2=Integer.parseInt(et2.getText().toString());
if (checkBox1.isChecked()==true) {
int suma=nro1+nro2;
String resu=String.valueOf(suma);
et3.setText(resu);
}
else
if (checkBox2.isChecked()==true) {
int resta=nro1-nro2;
String resu=String.valueOf(resta);
et3.setText(resu);
}
else
if (checkBox3.isChecked()==true) {
int mul=nro1*nro2;
String resu=String.valueOf(mul);
et3.setText(resu);
}
}
}
Practica 8 Operaciones aritmética utilizando Spinner
package com.example.programa8_bis;
import com.example.programa8_bis.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Spinner;
import android.widget.ArrayAdapter;
public class MainActivity extends Activity {
private Spinner spinner1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
spinner1 = (Spinner) findViewById(R.id.spinner1);
String []opciones={"sumar","restar","multiplicar","dividir"};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, opciones);
spinner1.setAdapter(adapter);
}
@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;
}
public void operar(View view) {
EditText et1=(EditText)findViewById(R.id.et1);
EditText et2=(EditText)findViewById(R.id.et2);
TextView tv3=(TextView)findViewById(R.id.tv3);
int nro1=Integer.parseInt(et1.getText().toString());
int nro2=Integer.parseInt(et2.getText().toString());
String selec=spinner1.getSelectedItem().toString();
if (selec.equals("sumar")) {
int suma=nro1+nro2;
String resu=String.valueOf(suma);
tv3.setText(resu);
}
else
if (selec.equals("restar")) {
int resta=nro1-nro2;
String resu=String.valueOf(resta);
tv3.setText(resu);
}
else
if (selec.equals("multiplicar")) {
int multi=nro1*nro2;
String resu=String.valueOf(multi);
tv3.setText(resu);
}
else
if (selec.equals("dividir")) {
int divi=nro1/nro2;
String resu=String.valueOf(divi);
tv3.setText(resu);
}
}
Programas en Eclipse by Anonymous NaHdJbKYs on Scribd
Practica 5 by Anonymous NaHdJbKYs on Scribd
Practica 6 by Anonymous NaHdJbKYs on Scribd
Practica 7 by Anonymous NaHdJbKYs on Scribd
Practica 8 by Anonymous NaHdJbKYs on Scribd
Mapa de la Aplicación en MobinCube
Insertar Imagen de Diversas Formas by Anonymous s0dZ48b4RY on Scribd
Insertar un Video by Anonymous s0dZ48b4RY on Scribd
Utilizar un ListView by Anonymous s0dZ48b4RY on Scribd
Tutorial de App Inventor 2 by Anonymous s0dZ48b4RY on Scribd
Proyecto en MobinCube
☺mapa_de_la_aplicacion by Anonymous jYCWM6O73 on Scribd
MAPA DE NAVEGACIÓN SUPER DETALLADO (APP INVENTOR 2)
MAPA DE NAVEGACIÓN (APP INVENTOR 2)
PRESENTACIÓN APP INVENTOR (FINAL)
Map a Inventor by Anonymous jYCWM6O73 on Scribd




No hay comentarios:
Publicar un comentario