app/src/main/res/values/styles.xml
author Da Risk <da_risk@geekorum.com>
Thu, 05 Sep 2019 16:20:55 -0700
changeset 434 79b5916c640d
parent 361 56b65ecb4736
child 472 7ff671827450
permissions -rw-r--r--
Update to latest material library

<!--

    Geekttrss is a RSS feed reader application on the Android Platform.

    Copyright (C) 2017-2019 by Frederic-Charles Barthelery.

    This file is part of Geekttrss.

    Geekttrss is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Geekttrss is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Geekttrss.  If not, see <http://www.gnu.org/licenses/>.

-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:tools="http://schemas.android.com/tools">

    <!-- Activity themes -->

    <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <!-- use the material Blue Grey palette -->
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primary_darker</item>
        <item name="colorPrimaryVariant">@color/primary_variant</item>
        <item name="colorSecondary">@color/secondary</item>
        <item name="colorSecondaryVariant">@color/secondary_variant</item>
        <item name="colorOnPrimary">@color/color_on_primary</item>
        <item name="colorOnSecondary">@color/color_on_secondary</item>

        <!-- used to configure style on the content webview -->
        <item name="articleBackground">?colorSurface</item>
        <!-- must be a color, not a drawable -->
        <item name="articleTextColor">@color/article_text_color</item>
        <item name="linkColor">?colorSecondary</item>
        <item name="bottomAppBarStyle">@style/Widget.AppTheme.BottomAppBar</item>
        <item name="materialAlertDialogTheme">@style/ThemeOverlay.AppTheme.AlertDialog</item>
        <!-- This style needs to be applied manually in layout to have the correct theme overlay -->
        <item name="appBarToolbarStyle">@style/Widget.AppTheme.AppBar.Toolbar</item>
        <item name="appBarCollapsingToolbarStyle">@style/Widget.AppTheme.AppBar.CollapsingToolbar</item>
    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

    <!-- Activity with no UI that launch an other activity immediately-->
    <style name="AppTheme.LauncherActivity">
        <item name="android:windowBackground">@null</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowAnimationStyle">@null</item>
        <item name="android:windowDisablePreview">true</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowNoTitle">true</item>
    </style>

    <style name="AppTheme.ArticleListActivity" parent="AppTheme.NoActionBar">
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:navigationBarColor">?android:colorBackground</item>
    </style>

    <style name="AppTheme.ArticleDetailActivity" parent="AppTheme.NoActionBar">
        <item name="android:navigationBarColor">?android:colorBackground</item>
    </style>


    <!-- Theme overlays -->

    <style name="ThemeOverlay.AppTheme.DayNight" parent="@style/ThemeOverlay.MaterialComponents.Light"/>
    <style name="ThemeOverlay.AppTheme.DayNight.Inverse" parent="@style/ThemeOverlay.MaterialComponents.Dark" />

    <style name="ThemeOverlay.AppTheme.TranslucentButton" parent="ThemeOverlay.AppTheme.DayNight">
        <item name="colorButtonNormal">@android:color/transparent</item>
    </style>

    <style name="ThemeOverlay.AppTheme.LoginForm" parent="ThemeOverlay.AppTheme.DayNight">
        <item name="textInputStyle">@style/LoginForm.TextInputStyle</item>
    </style>

    <style name="ThemeOverlay.AppTheme.AlertDialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
        <item name="materialAlertDialogTitleTextStyle">@style/AlertDialogTitleTextStyle</item>
    </style>


    <!-- Widget styles -->

    <style name="Widget.AppTheme.BottomAppBar" parent="Widget.MaterialComponents.BottomAppBar.PrimarySurface">
        <item name="fabCradleMargin">8dp</item>
        <item name="fabCradleRoundedCornerRadius">32dp</item>
    </style>

    <style name="Widget.AppTheme.AppBar.Toolbar" parent="Widget.MaterialComponents.Toolbar.PrimarySurface">
        <item name="background">@null</item>
    </style>

    <style name="Widget.AppTheme.AppBar.CollapsingToolbar" parent="">
        <item name="expandedTitleTextAppearance">@style/TextAppearance.AppTheme.CollapsingToolbar.Expanded</item>
        <item name="collapsedTitleTextAppearance">@style/TextAppearance.AppTheme.CollapsingToolbar.Collapsed</item>
    </style>


    <!-- Text appearances -->

    <style name="TextAppearance.AppTheme.CollapsingToolbar.Expanded" parent="TextAppearance.Design.CollapsingToolbar.Expanded">
        <item name="android:textColor">?colorOnPrimarySurface</item>
    </style>

    <style name="TextAppearance.AppTheme.CollapsingToolbar.Collapsed" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:textColor">?colorOnPrimarySurface</item>
    </style>

    <style name="TextAppearance.AppTheme.CollapsingToolbar.Expanded.Surface" parent="TextAppearance.Design.CollapsingToolbar.Expanded">
        <item name="android:textColor">@color/material_on_surface_emphasis_high_type</item>
    </style>

    <style name="TextAppearance.AppTheme.CollapsingToolbar.Collapsed.Surface" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:textColor">@color/material_on_surface_emphasis_high_type</item>
    </style>


    <!-- other very specific styles -->

    <style name="LoginForm.TextInputStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
        <item name="errorEnabled">true</item>
    </style>

    <style name="AlertDialogTitleTextStyle" parent="MaterialAlertDialog.MaterialComponents.Title.Text">
        <item name="android:textAppearance">?attr/textAppearanceHeadline6</item>
    </style>

    <style name="HeadlineCardFooterButton">
        <item name="android:layout_width">48dp</item>
        <item name="android:layout_height">48dp</item>
        <item name="android:clickable">true</item>
        <item name="android:focusable">true</item>
        <item name="android:padding">12dp</item>
    </style>


    <!-- defined in feature modules -->
    <style name="AppTheme.ManageFeedsActivity" tools:ignore="UnusedResources"/>
    <style name="AppTheme.AddFeedActivity" tools:ignore="UnusedResources"/>

</resources>