Magisk/app/src/main/res/values/styles_md2_impl.xml
Viktor De Pasquale ee06aed94b Updated toolbar and bottom bar design implementation
TBD:
Both toolbars should move away from the screen when scrolling
2019-10-10 17:34:06 +02:00

122 lines
4.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
These widgets are implementation of corresponding attribute. Never and I mean fucking never! use
these directly.
Although it is possible, it wouldn't automatically change the style when theme changes to "night"
variant. Make sure to use style referenced by attribute defined it attrs.xml.
-->
<resources>
<style name="WidgetFoundation.Appbar" parent="Widget.MaterialComponents.AppBarLayout.Surface">
<item name="elevation">0dp</item>
<item name="android:background">?colorSurfaceVariant</item>
</style>
<style name="WidgetFoundation.Toolbar" parent="Widget.MaterialComponents.Toolbar.Surface">
<item name="titleTextAppearance">?appearanceTextTitleNormal</item>
<item name="titleTextColor">?colorOnSurface</item>
<item name="subtitleTextAppearance">?appearanceTextCaptionNormal</item>
<item name="subtitleTextColor">?colorOnSurfaceVariant</item>
<item name="android:background">@android:color/transparent</item>
<item name="contentInsetStartWithNavigation">0dp</item>
<item name="android:layout_height">?actionBarSize</item>
</style>
<style name="WidgetFoundation.Card" parent="Widget.MaterialComponents.CardView">
<item name="cardBackgroundColor">?colorSurfaceVariant</item>
<item name="cardCornerRadius">@dimen/l_50</item>
<item name="cardElevation">0dp</item>
<item name="cardPreventCornerOverlap">true</item>
</style>
<style name="WidgetFoundation.Card.Elevated" parent="Widget.MaterialComponents.CardView">
<item name="cardBackgroundColor">?colorSurface</item>
<item name="cardElevation">@dimen/l_25</item>
</style>
<style name="WidgetFoundation.Card.OnPrimary" parent="Widget.MaterialComponents.CardView">
<item name="cardCornerRadius">@dimen/l_50</item>
<item name="cardElevation">0dp</item>
<item name="strokeColor">?colorOnPrimaryVariant</item>
<item name="strokeWidth">1dp</item>
<item name="cardBackgroundColor">?colorPrimary</item>
<item name="cardPreventCornerOverlap">true</item>
</style>
<style name="WidgetFoundation.Button" parent="Widget.MaterialComponents.Button">
<item name="android:textStyle">bold</item>
</style>
<style name="WidgetFoundation.Button.OnPrimary">
<item name="backgroundTint">?colorOnPrimary</item>
<item name="rippleColor">?colorPrimary</item>
<item name="android:textColor">?colorPrimary</item>
<item name="iconTint">?colorPrimary</item>
</style>
<style name="WidgetFoundation.Button.Flat" parent="Widget.MaterialComponents.Button.UnelevatedButton">
<item name="android:textStyle">bold</item>
</style>
<style name="WidgetFoundation.Button.Flat.OnPrimary">
<item name="backgroundTint">?colorOnPrimary</item>
<item name="rippleColor">?colorPrimary</item>
<item name="android:textColor">?colorPrimary</item>
<item name="iconTint">?colorPrimary</item>
</style>
<style name="WidgetFoundation.Button.Text" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:textStyle">bold</item>
</style>
<style name="WidgetFoundation.Button.Text.OnPrimary">
<item name="rippleColor">?colorOnPrimary</item>
<item name="android:textColor">?colorOnPrimary</item>
<item name="iconTint">?colorOnPrimary</item>
</style>
<style name="WidgetFoundation.Button.Error" parent="WidgetFoundation.Button.Text">
<item name="rippleColor">?colorError</item>
<item name="android:textColor">?colorError</item>
<item name="iconTint">?colorError</item>
</style>
<style name="WidgetFoundation.Image">
<item name="android:layout_width">32dp</item>
<item name="android:layout_height">32dp</item>
</style>
<style name="WidgetFoundation.Image.Big">
<item name="android:layout_width">48dp</item>
<item name="android:layout_height">48dp</item>
</style>
<style name="WidgetFoundation.Image.Small">
<item name="android:layout_width">24dp</item>
<item name="android:layout_height">24dp</item>
</style>
<style name="WidgetFoundation.Icon" parent="WidgetFoundation.Image.Big">
<item name="android:padding">@dimen/l_75</item>
<item name="android:background">?selectableItemBackgroundBorderless</item>
<item name="tint">?colorTextTransient</item>
</style>
<style name="WidgetFoundation.Icon.Primary">
<item name="tint">?colorPrimaryTransient</item>
</style>
<style name="WidgetFoundation.Icon.OnPrimary">
<item name="tint">?colorOnPrimaryTransient</item>
</style>
<style name="WidgetFoundation.Icon.Error">
<item name="tint">?colorErrorTransient</item>
</style>
</resources>