Index: /trunk/17.LifeCycleTest/default.properties =================================================================== --- /trunk/17.LifeCycleTest/default.properties (revision 42) +++ /trunk/17.LifeCycleTest/default.properties (revision 42) @@ -0,0 +1,13 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "build.properties", and override values to adapt the script to your +# project structure. + +# Indicates whether an apk should be generated for each density. +split.density=false +# Project target. +target=android-7 Index: /trunk/17.LifeCycleTest/.classpath =================================================================== --- /trunk/17.LifeCycleTest/.classpath (revision 42) +++ /trunk/17.LifeCycleTest/.classpath (revision 42) @@ -0,0 +1,7 @@ + + + + + + + Index: /trunk/17.LifeCycleTest/.project =================================================================== --- /trunk/17.LifeCycleTest/.project (revision 42) +++ /trunk/17.LifeCycleTest/.project (revision 42) @@ -0,0 +1,33 @@ + + + 17.LifeCycleTest + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + Index: /trunk/17.LifeCycleTest/AndroidManifest.xml =================================================================== --- /trunk/17.LifeCycleTest/AndroidManifest.xml (revision 42) +++ /trunk/17.LifeCycleTest/AndroidManifest.xml (revision 42) @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + Index: /trunk/17.LifeCycleTest/src/soo/elements/activity/LifeCycleTest.java =================================================================== --- /trunk/17.LifeCycleTest/src/soo/elements/activity/LifeCycleTest.java (revision 42) +++ /trunk/17.LifeCycleTest/src/soo/elements/activity/LifeCycleTest.java (revision 42) @@ -0,0 +1,85 @@ +package soo.elements.activity; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.Toast; + +public class LifeCycleTest extends Activity { + /** Called when the activity is first created.(硫�え由ъ� 留����吏��) */ + + private final String KIND ="Main-Activity"; + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Log.i(KIND,"onCreate()"); + setContentView(R.layout.main); + + Button b1 = (Button)findViewById(R.id.button01); + Button b2 = (Button)findViewById(R.id.button02); + + b1.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // ��� Activity濡��대������以��. + Intent i = new Intent(LifeCycleTest.this,SubActivity.class); + startActivity(i); //intent : �ъ����濡�����쇨� ���. + } + }); + + b2.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // TODO Auto-generated method stub + AlertDialog.Builder ad = new AlertDialog.Builder(LifeCycleTest.this); + ad.setTitle("���李���ぉ"); + ad.setMessage("���李��댁�"); + ad.setNeutralButton("�リ린",new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + + } + }); + ad.show(); + } + }); + } + + @Override + public void onStart(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onStart(); + Log.i(KIND,"onStart()"); + } + + @Override + public void onResume(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onResume(); + Log.i(KIND,"onResume()"); + } + + @Override + public void onPause(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onPause(); + Log.i(KIND,"onPause()"); + } + + @Override + public void onStop(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onStop(); + Log.i(KIND,"onStop()"); + } + + @Override + public void onDestroy(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onDestroy(); + Log.i(KIND,"onDestroy()"); + } +} Index: /trunk/17.LifeCycleTest/src/soo/elements/activity/SubActivity.java =================================================================== --- /trunk/17.LifeCycleTest/src/soo/elements/activity/SubActivity.java (revision 42) +++ /trunk/17.LifeCycleTest/src/soo/elements/activity/SubActivity.java (revision 42) @@ -0,0 +1,63 @@ +package soo.elements.activity; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; + +public class SubActivity extends Activity { + + private final String KIND ="Sub-Activity"; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Log.i(KIND,"onCreate()"); + setContentView(R.layout.sub); + + Button b3 = (Button)findViewById(R.id.button03); + + b3.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + // 硫�� Activity濡��대������以��. + Intent i = new Intent(SubActivity.this,LifeCycleTest.class); + startActivity(i); //intent : �ъ����濡�����쇨� ���. + } + }); + } + + @Override + public void onStart(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onStart(); + Log.i(KIND,"onStart()"); + } + + @Override + public void onResume(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onResume(); + Log.i(KIND,"onResume()"); + } + + @Override + public void onPause(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onPause(); + Log.i(KIND,"onPause()"); + } + + @Override + public void onStop(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onStop(); + Log.i(KIND,"onStop()"); + } + + @Override + public void onDestroy(){ //�ъ������ �������렐�����蹂대� �ш���媛�������. + super.onDestroy(); + Log.i(KIND,"onDestroy()"); + } +} Index: /trunk/17.LifeCycleTest/res/values/strings.xml =================================================================== --- /trunk/17.LifeCycleTest/res/values/strings.xml (revision 42) +++ /trunk/17.LifeCycleTest/res/values/strings.xml (revision 42) @@ -0,0 +1,5 @@ + + + Hello World, LifeCycleTest! + LifeCycleTest + Index: /trunk/17.LifeCycleTest/res/layout/main.xml =================================================================== --- /trunk/17.LifeCycleTest/res/layout/main.xml (revision 42) +++ /trunk/17.LifeCycleTest/res/layout/main.xml (revision 42) @@ -0,0 +1,25 @@ + + + +