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 |
Tags
- flow
- 안드로이드 스튜디오
- build
- studio
- Kotlin
- Github
- dart
- 에러
- coroutine
- 안드로이드
- Android
- 레트로핏
- 안드로이드스튜디오
- RecyclerView
- 깃헙
- 코루틴
- image
- error
- ADB
- Gradle
- 코틀린
- 유튜브
- 웹뷰
- 스튜디오
- MVVM
- WebView
- viewpager
- Retrofit
- 안스
- 의존성주입
Archives
- Today
- Total
코딩하는 일용직 노동자
안드로이드 StatusBar 색상 변경하기. (Kotlin) 본문
# 방법1
res/style.xml 파일 수정.
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textViewStyle">@style/TextViewStyle</item>
</style>
메니페스트 파일에서 theme 에 설정.
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
# 방법2
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setStatusBarColor()
window.statusBarColor = Color.parseColor("#ff0000")
}
'안드로이드' 카테고리의 다른 글
SMS Retriever (0) | 2020.05.03 |
---|---|
안드로이드 Dokka 사용방법 (0) | 2020.05.03 |
안드로이드 웹뷰(WebView) 셋팅 (Kotlin) (0) | 2020.05.03 |
Kotpref 를 이용해 SharedPreferences 를 더 쉽게 이용해보자. (0) | 2020.05.02 |
안드로이드 MVVM 패턴으로 작업해보기 (5) (0) | 2020.05.01 |