Busca

Google

domingo, 24 de abril de 2011

Creando el Hola Punto Geek (Android) - tu primer programa en Android's OS

este es un tutorial que encontre sobre como crear tu primer programa para el sistema operativo Android de google, es meramente informativo, y te ayudara a introducirte al mundo de la programacion para los gadgets que llevan android. suerte =)

Vamos a ver cómo crear el primer proyecto sobre android, en este caso le voy a cambiar el nombre a Hola Punto Geek (ya que el primer proyecto en una plataforma nueva siempre es el “Hola Mundo”).

Para esto deberán tener instalado MOTODEV studio for Android (este es un buen tutorial de cómo se hace).

Abrimos MOTODEV y seguimos estos pasos:

1.Vamos a Archivo->Nuevo->Proyecto Android utilizando Studio for Android.

2.En la pantalla de “Nuevo proyecto Android” rellenamos estos campos:

Nombre del proyecto: HolaPuntoGeek.

Destino: Android 2.1

Nombre de la aplicación: Hola Punto Geek

Click en el botón Finalizar.

3.En el explorador de paquetes navegamos hasta: HolaPuntoGeek->src->com.holapuntogeek y hacemos doble click en MainActivity.java, se tiene que abrir la clase en el editor de código.

4.Ahora en el código de MainActivity.java vamos a borrar la línea

setContentView(R.layout.main);

y agregamos estas líneas en su lugar:

TextView txt = new TextView(this);

txt.setText(“¡¡¡Hola Punto Geek!!!”);

setContentView(txt);

ImageView img = new ImageView(this);

img.setImageResource(R.drawable.logo);

setContentView(img);

Al inicio de la clase debemos agregar esta línea (debajo de los otros import):

import android.widget.*;

5. El código debe quedar como este:

6.Ahora volvemos al explorador de paquetes navegamos hasta HolaPuntoGeek->res y hacemos click derecho en res ->Nueva->Carpeta y le damos el nombre “drawable” y agregamos a esta carpeta el logo de Punto Geek con el nombre logo.png.

7.Para finalizar hacemos click derecho en “HolaPuntoGeek” en el explorador de paquetes vamos a Ejecutar Como->Android Application

8.Debemos ver nuestra primera App en el emulador (si no ven el emulador pueden ir a Ventana->Mostrar vista->Emulador de Android)

Eso es todo. Saludos.


Este artículo fue copiado de Creando el Hola Punto Geek (Android) | Punto Geek
Visita el sitio original para más información
También puedes visitar 140GEEK

7 comentarios:

Anónimo dijo...

What's Taking place i am new to this, I stumbled upon this I've discovered It absolutely useful and it has
aided me out loads. I hope to contribute & assist different users like its helped me.
Good job.

Also visit my web page www.linkiamo.com
My page :: http://tecnidoc09.bibliosistemas.com.ar/index.php?title=What_Everyone_Ought_to_Know_About_Internet_Hosting

Anónimo dijo...

Hurrah! After all I got a web site from where I be
capable of truly get valuable information regarding my study and knowledge.


my site: designskala.com

Anónimo dijo...

You need to take part in a contest for one of
the finest sites online. I will recommend this site!


Here is my blog - naturalanxietyremediestips.com

Anónimo dijo...

Hello to every , since I am actually keen of reading this webpage's post to be updated on a regular basis. It contains nice material.

my weblog: Bluehost Recommendations

Anónimo dijo...

Way cool! Some extremely valid points! I appreciate you penning
this article and the rest of the site is also very good.

My blog - http://www.articlerich.com/

Anónimo dijo...

My spouse and I stumbled over here different web address and thought I may as well check things out.
I like what I see so now i'm following you. Look forward to finding out about your web page repeatedly.

Feel free to visit my web blog Hostgator Ratings

Anónimo dijo...

This piece of writing is truly a nice one it helps new internet people, who are wishing for blogging.


Here is my blog post; vexxhost review sites