我正在让我的主要活动启动另一个将呈现UI的活动。当我在第二个活动中尝试从Eclipse停止进程时,该进程立即重新启动!我必须先按“返回”一次,然后才能在不重新启动的情况下手动停止该过程
我错过了什么?
主要活动:
package org.test;
import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
public class main extends ActivityGroup {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
Intent intent = new Intent(this, ScreenMain.class);
startActivity(intent);
}
@Override
public void onDestroy() {
finish();
}
}
第二项活动:
package org.test;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.GridView;
public class ScreenMain extends Activity {
private GridView mGridView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.screen_main);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}