Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 1차원 DP
- 2차원 dp
- 99클럽
- @BeforeAll
- @BeforeEach
- @Builder
- @Entity
- @GeneratedValue
- @GenericGenerator
- @NoargsConstructor
- @Query
- @Table
- @Transactional
- Actions
- Amazon EFS
- amazon fsx
- Android Studio
- ANSI SQL
- api gateway 설계
- api gateway 필터
- ApplicationEvent
- argocd
- assertThat
- async/await
- AVG
- AWS
- aws autoscaling
- aws eks
- AWS KMS
- aws vpc peering
Archives
- Today
- Total
기록
andriodStudio/다크 테마 지원하기 본문
문제
어두운 테마는 Android 10 (API 레벨 29) 이상에서 제공된다.
글씨색을 검은색으로 하게 되면 배경 색이 어두울 때 글씨를 알아 볼 수 없다.
1. res/values-night/colors.xml 만들기
values/colors.xml에 추가
<!-- text color -->
<color name="text_color">#FF000000</color>
night/colors.xml에 추가
<!-- text color -->
<color name="text_color">#FF000000</color>
2. styles 커스텀 하기
themes.xml에 추가
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="..." ...>
...
<!-- text style -->
<item name="android:textColor">@color/text_color</item>
</style>
</resources>
night/themes.xml
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="..." ...>
...
<!-- text style -->
<item name="android:textColor">@color/text_color</item>
</style>
</resources>
결과
참고
https://developer.android.com/guide/topics/ui/look-and-feel/darktheme?hl=ko
어두운 테마 | Android 개발자 | Android Developers
어두운 테마 어두운 테마는 Android 10 (API 레벨 29) 이상에서 제공됩니다. 어두운 테마는 다음과 같은 여러 가지 장점이 있습니다. 전력 사용량을 상당히 절약할 수 있습니다(기기 화면 기술에 따
developer.android.com
'Moblie > Android' 카테고리의 다른 글
디자인 패턴/java/Command Pattern (0) | 2022.05.20 |
---|---|
[issue] ScrollView vs NestScrollView (0) | 2022.05.12 |
androidStudio/kotlin/cutomview (0) | 2022.04.25 |
[issue] deprecated/BottomNavigationView.OnNavigationItemSelectedListener (0) | 2022.04.18 |
androidStudio/compose (0) | 2022.04.14 |
Comments