기술/beginning games2011.05.24 16:31
download download
public class LifeCycleTest extends Activity {

StringBuilder b = new StringBuilder();
TextView textView;
private void log(String text){
Log.d("LifeCycle Test",text);
b.append(text);
b.append('\n');
textView.setText(b.toString());
}
@Override
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   textView = new TextView(this);
   textView.setText(b.toString());
   setContentView(textView);
   log("created");
}
@Override
protected void onResume(){
super.onResume();
log("resumed");
}

@Override
protected void onPause(){
super.onPause();
log("paused");
if(isFinishing()){
log("finishing");
}
}
}

 


저작자 표시
신고
download download download
Posted by [lying dragon] Ed Kim