Add theming system
Standardize theming across the app into ThemeUtils.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners android:radius="4dp" />
|
||||
<size android:height="2dp" />
|
||||
<size android:height="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -14,8 +14,7 @@
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:titleTextAppearance="@style/ToolbarStyle"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold"
|
||||
app:title="@string/title_library_fragment" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/loading_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateTint="@color/blue"
|
||||
android:indeterminateTint="?attr/colorPrimary"
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:paddingBottom="@dimen/padding_tiny"
|
||||
app:layout_constraintBottom_toTopOf="@+id/error_text"
|
||||
@@ -28,7 +28,8 @@
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:indeterminateTint="@color/blue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_text"
|
||||
@@ -53,13 +54,14 @@
|
||||
android:text="@string/label_retry"
|
||||
android:visibility="gone"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:textColor="@color/blue"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/error_text"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"
|
||||
tools:textColor="@color/blue" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -20,6 +20,7 @@
|
||||
android:layout_height="@dimen/tab_menu_size"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:tabIndicatorColor="?android:attr/colorPrimary"
|
||||
app:tabGravity="fill"
|
||||
app:tabMode="fixed"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:titleTextAppearance="@style/ToolbarStyle"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/title_all_songs" />
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<dimen name="cover_size_compact">44dp</dimen>
|
||||
<dimen name="cover_size_normal">56dp</dimen>
|
||||
|
||||
<dimen name="tab_menu_size">38dp</dimen>
|
||||
<dimen name="tab_menu_size">40dp</dimen>
|
||||
|
||||
<dimen name="elevation_normal">4dp</dimen>
|
||||
</resources>
|
||||
@@ -1,15 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Base theme -->
|
||||
<style name="BaseTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="android:colorPrimary">@color/blue</item>
|
||||
<style name="Theme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="android:windowBackground">@color/background</item>
|
||||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
</style>
|
||||
|
||||
<style name="ToolbarStyle" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
|
||||
<style name="TextAppearance.Toolbar.Bold" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
|
||||
<item name="android:fontFamily">@font/inter_black</item>
|
||||
<item name="android:textColor">@color/blue</item>
|
||||
<item name="android:textColor">?android:attr/colorPrimary</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Red" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/red</item>
|
||||
<item name="colorSecondary">@color/red</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Pink" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/pink</item>
|
||||
<item name="colorSecondary">@color/pink</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Purple" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/purple</item>
|
||||
<item name="colorSecondary">@color/purple</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.DeepPurple" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/deep_purple</item>
|
||||
<item name="colorSecondary">@color/deep_purple</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Indigo" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/indigo</item>
|
||||
<item name="colorSecondary">@color/indigo</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Blue" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/blue</item>
|
||||
<item name="colorSecondary">@color/blue</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.LightBlue" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/light_blue</item>
|
||||
<item name="colorSecondary">@color/light_blue</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Theme.Cyan" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/cyan</item>
|
||||
<item name="colorSecondary">@color/cyan</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Theme.Teal" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/teal</item>
|
||||
<item name="colorSecondary">@color/teal</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Theme.Green" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/green</item>
|
||||
<item name="colorSecondary">@color/green</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Theme.LightGreen" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/light_green</item>
|
||||
<item name="colorSecondary">@color/light_green</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Lime" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/lime</item>
|
||||
<item name="colorSecondary">@color/lime</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Yellow" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/yellow</item>
|
||||
<item name="colorSecondary">@color/yellow</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Amber" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/amber</item>
|
||||
<item name="colorSecondary">@color/amber</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Orange" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/orange</item>
|
||||
<item name="colorSecondary">@color/orange</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.DeepOrange" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/deep_orange</item>
|
||||
<item name="colorSecondary">@color/deep_orange</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Brown" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/brown</item>
|
||||
<item name="colorSecondary">@color/brown</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Gray" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/grey</item>
|
||||
<item name="colorSecondary">@color/grey</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.BlueGrey" parent="Theme.Base">
|
||||
<item name="colorPrimary">@color/blue_grey</item>
|
||||
<item name="colorSecondary">@color/blue_grey</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user