PuniCharana / ThemeDemo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ThemeDemo

Theme Demo

Issues

  1. StatusBar background becomes white

Theme Demo

  1. Title and back button is not visible

Theme Demo

Solution

<resources>
    <!-- Base application theme. -->

    <!-- Solution 1. change Theme.AppCompat.DarkActionBar to Theme.AppCompat.Light-->

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

        <!-- Solution 2. add textColorPrimary-->
        <item name="android:textColorPrimary">@color/colorAccent</item>

        <item name="android:windowLightStatusBar">true</item>
    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
    </style>

    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
    	<!-- Solution 2. add textColorPrimary-->
        <item name="android:textColorPrimary">@color/colorAccent</item>
    </style>

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light">
        <!-- Solution 2. add textColorPrimary-->
        <item name="android:textColorPrimary">@color/colorAccent</item>
    </style>

</resources>

Theme Demo

Theme Demo

About


Languages

Language:Kotlin 100.0%