티스토리 뷰
타이틀바 없애는 소스
android:theme=”@android:style/Theme.NoTitleBar”
매니패스트에서 교체하고 나면 어플 실행시 오류가 나면서 실행이 안됩니다.
메인액티비티에 Hellow World밖에 없더라도 실행이 안되는 경우를 볼 수 있습니다.
저는 약간의 테마를 사용하기 위해서 밝은색 테마에 NoTitleBar 옵션을 사용했습니다. ㅋㅋ
소스코드상으로는 분명 오류가 없는데 이상하게 실행을 시키면 앱이 죽습니다.
구글링을 해보니 해당 증상에 대한 원인과 해결책이 있었습니다.
구글 검색해보니 해당 증상에 대한 원인과 해결책이 있더군요.
http://stackoverflow.com/questions/22828118/app-crashes-after-setting-to-theme-notitlebar-fullscreen
ActionBarActivity
assumes you are using an ActionBar
, while Theme.NoTitleBar
themes remove the ActionBar (as that is part of the title bar on newer devices and ActionBarActivity
assumes you are using a Theme.AppCompat
theme which controls styling for the ActionBar).
Change your activity to extend FragmentActivity
if you are okay with not having an Action Bar, although as per the Android design docs is a critical component for making your app feel like an Android app (although some would say that games are granted more leeway).
간단히 요약하자면 MainActivity가 ActionBarActivity를 extends하고 있어서 발생하는 오류로, FragmentActivity를 extends 하는 것으로 바꿔주면 정상적으로 실행시킬 수 있습니다.
'안드로이드' 카테고리의 다른 글
안드로이드 스마트폰 루팅 1 : 루팅! 알고하자 (0) | 2016.03.01 |
---|---|
LG 옵티머스 전기종 공장초기화 방법 (0) | 2016.02.29 |
안드로이드 : 퍼미션의 종류 (0) | 2015.06.11 |
안드로이드 : 프레그먼트(Fragment)의 개념 (0) | 2015.06.08 |
안드로이드 : 상단 타이틀바 제거하기 (0) | 2015.06.01 |
- Total
- Today
- Yesterday
- 리눅스
- 자료구조
- 소켓 프로그래밍
- MFC
- 파일
- 악보
- 클라이언트
- 클래스
- 스레드
- 소켓
- C
- Sort
- socket
- 라즈베리파이
- 파이썬
- UML
- 안드로이드
- 파이썬예제
- 프로세스
- 쓰레드
- 터미널
- 정렬
- 티그널
- 티라노 시그널
- 디렉터리
- 액터
- 유즈케이스
- C/C++
- 데이터베이스
- C++
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |