Notice
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 설치
- 안드로이드 gcm
- not working
- roundcube
- curl
- 안드로이드 푸쉬
- Mail Server
- javascript
- 안드로이드 푸시
- FCM
- WebView
- dovecot
- 폼메일
- 자동 생성
- html5
- 안드로이드
- soundpool
- C#
- android 효과음
- UML
- php 취약점
- Android
- C# IO
- 우분투
- xe
- chart.js
- 자바스크립트
- PHP
- php 시큐어코딩
- mysql
Archives
- Today
- Total
그러냐
Activity 에 적용한 theme 과 AlertDialog theme 을 다르게 적용하기 본문
반응형
Activity theme 을 적용하면 해당 activity 에서 생성하는 AlertDialog 까지 theme 이 영향을 받는다.
상황)
ICS 용 앱을 개발하면서 title bar 는 GingerBread theme 를 사용하고 AlertDialog 는 ICS theme 를 따르고 싶다.
우선 안드로이드 버전별 기본 테마는 아래와 같다.
11 버전 이하의 경우 : @android:style/Theme
11 버전과 13의 경우 : @android:style/Theme.Holo
14 이상의 경우 : @android:style/Theme.DeviceDefault
인용: http://starkapin.tistory.com/379
AndroidManifest.xml 파일을 열고 activity 에 11 버전의 기본 theme 를 설정한다.
- <activity
- android:name=".TestActivity" android:label="Test"
- android:theme="@android:style/Theme">
- </activity>
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
ICS 기본 테마를 따르게 했다.
- AlertDialog.Builder builder = new AlertDialog.Builder(this, AlertDialog.THEME_DEVICE_DEFAULT_DARK);
출처 : https://tjandroid.blogspot.kr/2012/01/activity-theme-alertdialog-theme.html
반응형
'android' 카테고리의 다른 글
| webview 쿠키 설정 (0) | 2017.04.03 |
|---|---|
| 안드로이드 webview 자판 화면 가림 (0) | 2017.03.29 |
| (Android) 이미지 용량 줄이기 (Bitmap 관리) (0) | 2017.03.06 |
| android 6 권한 주기 (0) | 2017.03.06 |
| webview 새로고침현상 카메라로찍었을때 (1) | 2017.03.06 |


