DESARROLLO DE APLICACIONES MOVILES I

69
DESARROLLO DE APLICACIONES MOVILES I

description

DESARROLLO DE APLICACIONES MOVILES I. Temas CheckBox Spinner. CHECKBOX. Primeramente vamos a mostrarle los pasos a seguir para implementar un ejemplo utilizando un checkbox: Paso 1 : Creando un Proyecto. 1. 2. CHECKBOX. Paso 2 : Creando un Proyecto. 1. 2. CHECKBOX. - PowerPoint PPT Presentation

Transcript of DESARROLLO DE APLICACIONES MOVILES I

Page 1: DESARROLLO DE APLICACIONES MOVILES  I

DESARROLLO DE APLICACIONES MOVILES I

Page 2: DESARROLLO DE APLICACIONES MOVILES  I

• Temas

–CheckBox– Spinner

Page 3: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX

• Primeramente vamos a mostrarle los pasos a seguir para implementar un ejemplo utilizando un checkbox:– Paso 1 : Creando un Proyecto

1

2

Page 4: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 2 : Creando un Proyecto

2

1

Page 5: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 3 : Creando un Proyecto

1

2

Page 6: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 4 : Creando un Proyecto

1

2

Page 7: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 5 : Creando un Proyecto

1

2

3

Page 8: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 6 : Implementando los CheckBox

1:doble clic

2:Dar clic y arrastrar el

checkbox al escenario

escenario

Page 9: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 7 : Implementando los CheckBox

1 : Arrastrar y soltar

2 : Arrastrar y soltar

3 : Arrastrar y soltar

Page 10: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 8 : Implementando los CheckBox

2 : seleccionar

Edit ID1 :seleccionar

Page 11: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 9 : Implementando los CheckBox

1 :colocar el nombre del checkbox

2

Page 12: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 10 : Implementando los CheckBox

2 : seleccionar

Edit Text1 :seleccionar

Page 13: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 11 : Implementando los CheckBox

1 :Dar clic

2

Page 14: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 12 : Implementando los CheckBox

1 :Colocar nombre del checkbox

2: nombre de la

variable

3:presionar boton

Page 15: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 13 : Implementando los CheckBox

2 :presionar botón

1:seleccionar

Page 16: DESARROLLO DE APLICACIONES MOVILES  I

CHECKBOX– Paso 14 : Finalmente Llegamos a este diseño

Page 17: DESARROLLO DE APLICACIONES MOVILES  I

EL DISEÑO FINAL

Agregando adicionalmente un

botón

Page 18: DESARROLLO DE APLICACIONES MOVILES  I

Mapeando los checkbox del main.xml

Declarando las referencias de las

clases

Page 19: DESARROLLO DE APLICACIONES MOVILES  I

Mapeando los checkbox del main.xml

Mapeando los componentes

checkbox ,Button definidos en el

archivo main.xml

Page 20: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO AL BOTON

1 ) Importar paquete

2) Agregar Implementación

3) Agregar Método

Page 21: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO AL BOTON

1 ) Agregar esta línea de código

3) Agregar el siguiente método

simple

Page 22: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO AL BOTON

1 ) Implementar el método

1 ) Invocar el método

Page 23: DESARROLLO DE APLICACIONES MOVILES  I

Desarrollando el Método Ejecutar

1) Finalmente desarrollar el

método Ejecutar

Page 24: DESARROLLO DE APLICACIONES MOVILES  I

EJECUTANDO EL PROGRAMA

Page 25: DESARROLLO DE APLICACIONES MOVILES  I

DESARROLLANDO NUEVO PROGRAMA

• A continuación vamos a desarrollar el mismo programa pero ahora ya no será en función al evento de dar clic al botón , sino en el momento de dar check a las opciones :

Page 26: DESARROLLO DE APLICACIONES MOVILES  I

Mapeando los checkbox del main.xml

1) Declarando las referencias de la clase

CheckBox

2) Mapeando a los objetos definidos en el archivo main.xml

Page 27: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO DE DAR CHECK

1) Importar paquete

2) Implementación de la Interfaz

Page 28: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO DE DAR CHECK

1) Dar clic

2) Seleccionar y Dar clic

Page 29: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO DE DAR CHECK

1) Método Implementado

Page 30: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO DE DAR CHECK

1) Adicionar a cada unos de los checkbox

estos códigos

Page 31: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO DE DAR CHECK

2) Método Invocado

1) Método Implementado

Page 32: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO DE DAR CHECK1) Finalmente desarrollar el

método Ejecutar

Page 33: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER

• Primeramente vamos a mostrarle los pasos a seguir para implementar un ejemplo utilizando un Spinner :– Paso 1 : Creando un Proyecto

1

2

Page 34: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 2 : Creando un Proyecto

2

1

Page 35: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 3 : Creando un Proyecto

1

2

Page 36: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 4 : Creando un Proyecto

1

2

Page 37: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 5 : Creando un Proyecto

1

2

3

Page 38: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 6 : Implementando el Spinner.

1:doble clic

2:Dar clic y arrastrar el Spinner al escenario

escenario

Page 39: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 7 : Implementando el Spinner

1 : Arrastrar y soltar

Page 40: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 8 : Implementando el Spinner

2 : seleccionar

Edit ID1 :seleccionar

Page 41: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 9 : Implementando el Spinner

1 :colocar el nombre del

Spinner

2: presionar el botón

Page 42: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 10 : Creando el archivo XML para el cargado del Spinner

1 ) Crear un archivo XML de nombre arreglo

2 ) Digitar dentro de arreglo.xml , el siguiente código

Page 43: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 11 : Creando el archivo XML para el cargado del Spinner

1 ) Crear un archivo XML de nombre arreglo

2 ) Digitar dentro de arreglo.xml , el siguiente código

Page 44: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 12 :Implementando un Botón(Button)

1:doble clic

2:Dar clic y arrastrar el Button al escenario

escenario

Page 45: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 12 :Implementando un Botón(Button)

1: Arrastrar y

soltar

Page 46: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 13 : Implementando un Botón(Button)

1: Seleccionar

2: seleccionar Edit ID y dar clic

Page 47: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 14 :Agregando un Botón(Button)

1 ) colocar el nombre del botón

2 ) Presionar el botón

OK

Page 48: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 15 :Agregando un Botón(Button)

1: Seleccionar

el Boton

2: seleccionar

en Edit Text y dar clic

Page 49: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 16 :Agregando un Botón(Button)

1: Presionar New String

Page 50: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 17 :Agregando un Botón(Button)

1: Colocar el Texto de la etiqueta del botón

2: Colocar el nombre

de la variable

3: Presionar el botón

OK

Page 51: DESARROLLO DE APLICACIONES MOVILES  I

SPINNER– Paso 18 :Agregando un Botón(Button)

1: Seleccionar la variable

2: Presionar el botón

OK

Page 52: DESARROLLO DE APLICACIONES MOVILES  I

SPINNERDISEÑO FINAL

Page 53: DESARROLLO DE APLICACIONES MOVILES  I

Mapeando los objetos del main.xml

Declarando las referencias de las

clases

Mapeando los componentes

Spinner y Button definidos en el

archivo main.xml

Page 54: DESARROLLO DE APLICACIONES MOVILES  I

Cargar el Spinner

Cargando en un ArrayAdapter los datos del archivo

XML

Cargando los datos

guardados en el ArrayAdapter en el Spinner

Page 55: DESARROLLO DE APLICACIONES MOVILES  I

EJECUTANDO EL PROGRAMA

Page 56: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO AL BOTON

1 ) Importar paquete

2) Agregar Implementación

3) Agregar Método

Page 57: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO AL BOTON

1 ) Agregar esta línea de código

3) Agregar el siguiente método

simple

Page 58: DESARROLLO DE APLICACIONES MOVILES  I

EVENTO AL BOTON

2 ) Implementar el método

1 ) Invocar el método

Page 59: DESARROLLO DE APLICACIONES MOVILES  I

Desarrollando el Método Ejecutar1) Finalmente desarrollar el

método Ejecutar

Page 60: DESARROLLO DE APLICACIONES MOVILES  I

EJECUTANDO FINALMENTE EL PROGRAMA

Page 61: DESARROLLO DE APLICACIONES MOVILES  I

EJECUTANDO FINALMENTE EL PROGRAMA

Page 62: DESARROLLO DE APLICACIONES MOVILES  I

DESARROLLANDO NUEVO PROGRAMA

• A continuación vamos a desarrollar el mismo programa pero ahora ya no será en función al evento de dar clic al botón , sino en el momento de seleccionar una opción desde el Spinner :

Page 63: DESARROLLO DE APLICACIONES MOVILES  I

Mapeando y cargando el Spinner

!1) Declarando la referencia del

Spinner

!2) Mapeando y cargando el

Spinner

Page 64: DESARROLLO DE APLICACIONES MOVILES  I

Evento de Seleccionar el Spinner

1) Importar paquete

!2) Implementar Interfaz

Page 65: DESARROLLO DE APLICACIONES MOVILES  I

Evento de Seleccionar el Spinner

1) Seleccionar y dar clic

Page 66: DESARROLLO DE APLICACIONES MOVILES  I

Evento de Seleccionar el Spinner

1) Métodos Implementados

Page 67: DESARROLLO DE APLICACIONES MOVILES  I

Evento de Seleccionar el Spinner

1) Implementar esta condicional simple

Page 68: DESARROLLO DE APLICACIONES MOVILES  I

Evento de Seleccionar el Spinner

2) Invocar Método

1) Implementar el Método Ejecutar

Page 69: DESARROLLO DE APLICACIONES MOVILES  I

Evento de Seleccionar el Spinner

1) Desarrollando

el Método Ejecutar