domingo, 9 de septiembre de 2012

Ciclo de una App


package com.android.azteca;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class ActividadPrincipal extends Activity {
String tag = “Eventos”;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle guardar) {
super.onCreate(guardar);
setContentView(R.layout.main);
Log.d(tag, “en onCreate()”);

}
public void onStart()
{
super.onStart();
Log.d(tag, “en onStart() t”);
}
public void onRestart()
{
super.onRestart();
Log.d(tag, “en onRestart() ”);
}
public void onResume()
{
super.onResume();
Log.d(tag, “en onResume() ”);
}
public void onPause()
{
super.onPause();
Log.d(tag, “en onPause()”);
}
public void onStop()
{
super.onStop();
Log.d(tag, “en onStop() ”);
}
public void onDestroy()
{
super.onDestroy();
Log.d(tag, “en onDestroy() ”);
}
}