티스토리 뷰

Android/XML

StatusBarColor

혀가 길지 않은 개발자 2020. 8. 3. 23:56

colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#6200EE</color>
    <color name="colorPrimaryDark">#3700B3</color>
    <color name="colorAccent">#03DAC5</color>

    <color name="title_bg">#F1501E</color>
 
</resources>

 

 

 

 

 

strings.xml

<resources>
    <string name="app_name">혀가 길지 않은 개발자 KotlinProject</string>
</resources>

 

 

 

 

 

 

styles.xml

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>

        <!-- Status Bar Color -->
        <item name="android:statusBarColor">@color/title_bg</item>

    </style>

</resources>

실행 결과

 

 

 

 

 

 

'Android > XML' 카테고리의 다른 글

<TabLayout>  (0) 2020.08.04
strings.xml  (0) 2020.08.04
<include>,  <ImageView>,  <ImageButton>  (0) 2020.08.04
styles-v21  패키지 만들기  (0) 2020.08.04
drawable  패키지에 이미지 추가  (0) 2020.08.03
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
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
글 보관함