app/src/main/res/values/styles.xml
author Da Risk <da_risk@geekorum.com>
Sun, 17 May 2020 19:26:38 -0400
changeset 687 0702bf708ac8
parent 627 9029e85de498
child 846 ac0863af5ef6
permissions -rw-r--r--
articles_list: style the tags

<!--

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

    Copyright (C) 2017-2020 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">

    <style name="Base.AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <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>

        <item name="floatingActionButtonStyle">@style/Widget.AppTheme.FloatingActionButton</item>
        <item name="bottomSheetStyle">@style/Widget.MaterialComponents.BottomSheet</item>
        <!-- Shapes-->
        <item name="shapeAppearanceSmallComponent">@style/ShapeAppearance.AppTheme.SmallComponent</item>
        <item name="shapeAppearanceMediumComponent">@style/ShapeAppearance.AppTheme.MediumComponent</item>
        <item name="shapeAppearanceLargeComponent">@style/ShapeAppearance.AppTheme.LargeComponent</item>

        <!-- Text appearances -->
        <item name="textAppearanceHeadline4">@style/TextAppearance.AppTheme.Headline4</item>
        <item name="textAppearanceHeadline5">@style/TextAppearance.AppTheme.Headline5</item>
        <item name="textAppearanceBody1">@style/TextAppearance.AppTheme.Body1</item>
        <item name="textAppearanceCaption">@style/TextAppearance.AppTheme.Caption</item>
        <item name="textAppearanceButton">@style/TextAppearance.AppTheme.Button</item>

        <!-- used to configure style on the content webview -->
        <item name="articleBackground">?colorSurface</item>
        <!-- must be a color, not a drawable -->
        <item name="articleTextColor">?android:textColorTertiary</item>
        <item name="linkColor">?colorSecondary</item>
    </style>

    <!-- Activity themes -->
    <style name="AppTheme" parent="Base.AppTheme">
        <!-- use the material Blue Grey palette -->
        <item name="colorPrimary">@color/material_blue_grey_500</item>
        <item name="colorPrimaryDark">@color/material_blue_grey_500_darker</item>
        <item name="colorPrimaryVariant">@color/material_blue_grey_500_darker</item>
        <item name="colorSecondary">@color/material_green_a700</item>
        <item name="colorSecondaryVariant">@color/material_green_a700_darker</item>
        <item name="colorOnPrimary">@android:color/white</item>
        <item name="colorOnSecondary">@android:color/white</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="articleListHeader">@color/material_blue_grey_500_lighter</item>
    </style>

    <style name="AppTheme.ArticleDetailActivity" parent="AppTheme.NoActionBar">
        <item name="android:statusBarColor">?android:windowBackground</item>
        <item name="android:windowLightStatusBar">true</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.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>

    <style name="ThemeOverlay.AppTheme.BottomSheet" parent="ThemeOverlay.MaterialComponents.Light">
        <item name="colorSurface">@color/material_blue_grey_100</item>
        <item name="colorPrimary">?colorSecondary</item>
    </style>

    <style name="ThemeOverlay.AppTheme.TagChip" parent="">
        <item name="colorPrimary">?colorSecondaryVariant</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>

    <style name="Widget.AppTheme.FloatingActionButton" parent="Widget.MaterialComponents.FloatingActionButton">
        <item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.AppTheme.FloatingActionButton</item>
    </style>


    <!-- Text appearances -->
    <style name="TextAppearance.AppTheme.Headline4" parent="TextAppearance.MaterialComponents.Headline4">
        <item name="fontFamily">@font/expletus_sans_medium</item>
    </style>

    <style name="TextAppearance.AppTheme.Headline5" parent="TextAppearance.MaterialComponents.Headline5">
        <item name="fontFamily">@font/expletus_sans_medium</item>
    </style>

    <style name="TextAppearance.AppTheme.Body1" parent="TextAppearance.MaterialComponents.Body1">
        <item name="fontFamily">@font/fenix</item>
    </style>

    <style name="TextAppearance.AppTheme.Caption" parent="TextAppearance.MaterialComponents.Caption">
        <item name="fontFamily">@font/rubik_light</item>
    </style>

    <style name="TextAppearance.AppTheme.Button" parent="TextAppearance.MaterialComponents.Button">
        <item name="fontFamily">@font/rubik</item>
    </style>

    <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>

    <!-- Shapes-->
    <style name="ShapeAppearance.AppTheme" parent="">
        <item name="cornerFamily">rounded</item>
        <item name="cornerSize">0dp</item>
    </style>

    <style name="ShapeAppearance.AppTheme.SmallComponent" parent="ShapeAppearance.AppTheme">
        <item name="cornerSizeTopRight">8dp</item>
        <item name="cornerSizeBottomLeft">8dp</item>
    </style>

    <style name="ShapeAppearance.AppTheme.MediumComponent" parent="ShapeAppearance.AppTheme">
        <item name="cornerSizeTopRight">16dp</item>
        <item name="cornerSizeBottomLeft">16dp</item>
    </style>

    <style name="ShapeAppearance.AppTheme.LargeComponent" parent="ShapeAppearance.AppTheme">
        <item name="cornerSizeTopRight">20dp</item>
        <item name="cornerSizeBottomLeft">20dp</item>
    </style>

    <style name="ShapeAppearanceOverlay.AppTheme.FloatingActionButton" parent="">
        <!-- use @null to change to 50% programmatically. -->
        <item name="cornerSize">@null</item>
        <item name="cornerSizeTopRight">@null</item>
        <item name="cornerSizeBottomLeft">@null</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 but we style need to specify the parent here, for universal apk-->
    <style name="AppTheme.ManageFeedsActivity" parent="AppTheme.NoActionBar" tools:ignore="UnusedResources"/>
    <style name="AppTheme.AddFeedActivity" parent="@style/Theme.MaterialComponents.DayNight.BottomSheetDialog"
            tools:ignore="UnusedResources"/>

</resources>