Activity 6

[안드로이드] AppCompatActivity에서 타이틀바 없애기 -requestFeature() must be called before adding content

안드로이드 기본 액티비티를 사용할 때는 this.requestWindowFeature(Window.FEATURE_NO_TITLE);요렇게 하면 타이틀바를 없앨 수 있었다. 하지만,AppCompatActivity에서는 Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content 요런 에러가 나서 죽는다. 요렇게 되면 앞 뒤로 배치 해보고 별 짓을 다 해본다. 액션바를 없애보기....// final ActionBar actionBar = getSupportActionBar();// actionBar.setDisplayShowTitleEnabled(false);// actionBar.re..

[안드로이드] Performing stop of activity that is not resumed

안드로이드 액티비티 포즈시에 아래와 같은 에러가 발생 한다면 Performing stop of activity that is not resumed @Override public void onPause() { super.onPause(); Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { abcdefg(); } }, 100); } 포즈시 오래 걸리는 작업은 위와 같이 좀 지연을 시키면 된다.

안드로이드 액티비티 싱글 탑의 비밀

안드로이드 싱글 탑? 한글로 적으니 뭔가 있어 보이기는 하는데.... 싱글탑의 비밀 중 한 개만 얘기 하고 가도록 하겠다.(사실 초보라 아는 것만 얘기 하지만 있어 보이고 싶나보다) 만약 액티비티를 실행 할 때 FLAG_ACTIVITY_SINGLE_TOP과 같은 플래그를 사용 하지 않는다면... 예를 들어 NO_HISTORY와 같은 플래그를 썼다면 돌아 올길이 막막해지는 경우가 있다. 문제1. A액티티비에서 startActivity를 FLAG_ACTIVITY_NO_HISTORY로 실행한 해서 B 액티비티로 갔다.2. B액티비티에서 startAcitivityForResult를 실행 하여 다른 액티비티 C로 이동 하였다. 3. C액티비티 또는 Preference 에서 볼일이 끝났다. 그럼 C 에서는 볼일을 ..