生命周期图解 以下英文引用全部来自google官方文档说明,方便理解. onCreate (Bundle savedInstanceState) You can call finish() from within this function, in which case onDestroy() will be immediately called without any of the rest of the activity
public class ActivityDemo extends Activity { private static final String TAG = "ActivityDemo"; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Log.e(TAG, "start onCreate~~