... 액티비티 전환이 안되서 문제입니다.
a->b로 가고 b에서 되돌아가기키를 누르면 a가 떠야 되는 상황인데.. 그냥 a가(b도 동시에) destroy되버리네요..
a에 관한 소스는
public class MainMenu extends Activity implements OnClickListener {
public static Context tempctext;
public String tag="main map";
// 하단 메뉴
ImageButton button1, button2, button3, button4;
.......
.....
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(tag, "onCreate(Bundle) invoked");
setContentView(R.layout.popup_pathfind);
myposition_start = (ImageButton) findViewById(R.id.myposition_start);
myposition_start.setOnClickListener(this);
myposition_arrive = (ImageButton) findViewById(R.id.myposition_arrive);
myposition_arrive.setOnClickListener(this);
place_find_btn_start = (ImageButton) findViewById(R.id.place_find_btn_start);
place_find_btn_start.setOnClickListener(this);
place_find_btn_arrive = (ImageButton) findViewById(R.id.place_find_btn_arrive);
place_find_btn_arrive.setOnClickListener(this);
// popup resource(place_find)
setContentView(R.layout.popup_plfind);
place_find_btn = (ImageButton) findViewById(R.id.place_find_btn);
place_find_btn.setOnClickListener(this);
// 메인
setContentView(R.layout.menu);
button1 = (ImageButton) findViewById(R.id.tap_map);
button1.setOnClickListener(this);
button2 = (ImageButton) findViewById(R.id.tap_search);
button2.setOnClickListener(this);
button3 = (ImageButton) findViewById(R.id.tap_road);
button3.setOnClickListener(this);
button4 = (ImageButton) findViewById(R.id.tap_menu);
button4.setOnClickListener(this);
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.tap_map:
Toast.makeText(this, "준비 중입니다", Toast.LENGTH_SHORT).show();
break;
case R.id.tap_search:
//팝업윈도우..
break;
case R.id.tap_menu:
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
break;
}
}
}
b는 그냥 그림 하나 띄어논 액티비티입니다....
로그는
08-05 13:56:41.776: D/dalvikvm(22466): GC_FOR_ALLOC freed 40K, 7% free 16862K/17976K, paused 23ms, total 25ms
08-05 13:56:41.796: I/dalvikvm-heap(22466): Grow heap (frag case) to 20.408MB for 3035712-byte allocation
08-05 13:56:41.806: D/dalvikvm(22466): GC_FOR_ALLOC freed <1K, 6% free 19825K/20944K, paused 11ms, total 11ms
08-05 13:56:41.821: D/dalvikvm(22466): GC_CONCURRENT freed <1K, 6% free 19825K/20944K, paused 3ms+1ms, total 14ms
08-05 13:56:41.856: D/dalvikvm(22466): GC_FOR_ALLOC freed <1K, 6% free 19825K/20944K, paused 10ms, total 10ms
08-05 13:56:41.886: I/dalvikvm-heap(22466): Grow heap (frag case) to 31.987MB for 12142800-byte allocation
08-05 13:56:41.896: D/dalvikvm(22466): GC_CONCURRENT freed 0K, 4% free 31683K/32804K, paused 1ms+2ms, total 11ms
08-05 13:56:41.896: D/dalvikvm(22466): WAIT_FOR_CONCURRENT_GC blocked 9ms
08-05 13:56:41.951: D/libEGL(22466): loaded /vendor/lib/egl/libEGL_POWERVR_SGX544_115.so
08-05 13:56:41.956: D/libEGL(22466): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so
08-05 13:56:41.956: D/libEGL(22466): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so
08-05 13:56:41.956: I/(22466): !@IMGSRV: DATE: 2013.04.23(11:19:33) | BUILDER: LSI3D | REVISION: e9cd1377d8225457ae40
08-05 13:56:42.006: D/OpenGLRenderer(22466): Enabling debug mode 0
08-05 13:56:43.011: I/main map(22466): onCreate(Bundle) invoked
08-05 13:56:43.101: D/dalvikvm(22466): GC_FOR_ALLOC freed 3619K, 14% free 31295K/35988K, paused 11ms, total 11ms
08-05 13:56:43.121: I/dalvikvm-heap(22466): Grow heap (frag case) to 39.826MB for 8616976-byte allocation
08-05 13:56:43.131: D/dalvikvm(22466): GC_FOR_ALLOC freed <1K, 11% free 39710K/44404K, paused 10ms, total 10ms
08-05 13:56:43.141: D/dalvikvm(22466): GC_CONCURRENT freed 4K, 11% free 39706K/44404K, paused 3ms+1ms, total 11ms
08-05 13:56:43.191: D/dalvikvm(22466): GC_FOR_ALLOC freed <1K, 11% free 39705K/44404K, paused 8ms, total 8ms
08-05 13:56:43.251: I/dalvikvm-heap(22466): Grow heap (frag case) to 72.692MB for 34467856-byte allocation
08-05 13:56:43.261: D/dalvikvm(22466): GC_FOR_ALLOC freed 0K, 7% free 73365K/78068K, paused 10ms, total 10ms
08-05 13:56:43.281: D/dalvikvm(22466): GC_CONCURRENT freed 0K, 7% free 73365K/78068K, paused 3ms+2ms, total 16ms
08-05 13:56:43.326: D/dalvikvm(22466): GC_FOR_ALLOC freed 8415K, 17% free 64950K/78068K, paused 9ms, total 9ms
08-05 13:56:43.381: I/dalvikvm-heap(22466): Grow heap (frag case) to 96.115MB for 33177616-byte allocation
08-05 13:56:43.391: D/dalvikvm(22466): GC_FOR_ALLOC freed <1K, 12% free 97350K/110472K, paused 10ms, total 10ms
08-05 13:56:43.406: D/dalvikvm(22466): GC_CONCURRENT freed <1K, 12% free 97351K/110472K, paused 2ms+3ms, total 14ms
08-05 13:56:43.451: I/main map(22466): onStart() invoked
08-05 13:56:43.451: I/main map(22466): onResume() invoked
08-05 13:56:43.526: D/main map_view(22466): THREAD START
08-05 13:56:43.626: E/SpannableStringBuilder(22466): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-05 13:56:43.626: E/SpannableStringBuilder(22466): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-05 13:56:45.471: D/GestureDetector(22466): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 4 mFalseSizeCnt:0
08-05 13:56:45.521: I/main map(22466): onPause() invoked
08-05 13:56:45.596: D/dalvikvm(22466): GC_FOR_ALLOC freed 33781K, 40% free 66653K/110472K, paused 13ms, total 13ms
08-05 13:56:45.601: I/dalvikvm-heap(22466): Grow heap (frag case) to 75.799MB for 10131984-byte allocation
08-05 13:56:45.616: D/dalvikvm(22466): GC_FOR_ALLOC freed 2K, 31% free 76545K/110472K, paused 13ms, total 13ms
08-05 13:56:45.636: D/dalvikvm(22466): GC_CONCURRENT freed 12228K, 39% free 67497K/110472K, paused 3ms+3ms, total 21ms
08-05 13:56:45.666: I/menu(22466): onStart() invoked
08-05 13:56:45.666: I/menu(22466): onResume() invoked
08-05 13:56:45.856: E/SpannableStringBuilder(22466): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-05 13:56:45.856: E/SpannableStringBuilder(22466): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-05 13:56:45.921: I/main map_view(22466): THREAD END
08-05 13:56:46.011: D/main map_view(22466): THREAD END
08-05 13:56:46.061: I/main map(22466): onSaveInstanceState(Bundle) invoked
08-05 13:56:46.061: I/main map(22466): onStop() invoked
08-05 13:56:47.091: I/menu(22466): onPause() invoked
08-05 13:56:47.286: I/menu(22466): onStop() invoked
08-05 13:56:47.286: I/menu(22466): onDestroy() invoked
08-05 13:56:47.296: I/main map(22466): onDestroy() invoked
이렇게 나옵니다... 로그에서 a는 main map 태그 이고, b는 menu로 태그 해놨습니다... 무엇이 문제인지 모르겠네요...
a에는 쓰레드를 사용중입니다...