Update resources

Update layouts to not assign a primary color through the tools namespace anymore, also bring back the light theme, which apparently disappeared at some point.
This commit is contained in:
OxygenCobalt 2020-09-16 07:00:55 -06:00
parent f3e47414b0
commit ebc5aac011
16 changed files with 71 additions and 66 deletions

1
app/.gitignore vendored
View file

@ -1 +0,0 @@
/build

View file

@ -20,5 +20,4 @@
# hide the original source file name. # hide the original source file name.
#-renamesourcefileattribute SourceFile #-renamesourcefileattribute SourceFile
-dontobfuscate -dontobfuscate
-keep class org.oxycblt.auxio.loading.LoadingFragment

View file

@ -3,7 +3,6 @@ package org.oxycblt.auxio.loading
import android.Manifest import android.Manifest
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.os.Bundle import android.os.Bundle
import android.transition.TransitionInflater
import android.util.Log import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -100,12 +99,7 @@ class LoadingFragment : Fragment(R.layout.fragment_loading) {
} }
private fun onMusicLoadResponse(response: MusicLoaderResponse?) { private fun onMusicLoadResponse(response: MusicLoaderResponse?) {
binding.loadingBar.visibility = View.GONE
if (response == MusicLoaderResponse.DONE) { if (response == MusicLoaderResponse.DONE) {
exitTransition = TransitionInflater.from(requireContext())
.inflateTransition(R.transition.transition_to_main)
findNavController().navigate( findNavController().navigate(
LoadingFragmentDirections.actionToMain() LoadingFragmentDirections.actionToMain()
) )
@ -119,6 +113,8 @@ class LoadingFragment : Fragment(R.layout.fragment_loading) {
// If the response wasn't a success, then show the specific error message // If the response wasn't a success, then show the specific error message
// depending on which error response was given, along with a retry button // depending on which error response was given, along with a retry button
binding.loadingBar.visibility = View.GONE
binding.errorText.visibility = View.VISIBLE binding.errorText.visibility = View.VISIBLE
binding.statusIcon.visibility = View.VISIBLE binding.statusIcon.visibility = View.VISIBLE
binding.retryButton.visibility = View.VISIBLE binding.retryButton.visibility = View.VISIBLE

View file

@ -12,13 +12,4 @@ https://stackoverflow.com/a/61157571/14143986
android:color="@color/divider_color" /> android:color="@color/divider_color" />
</shape> </shape>
</item> </item>
<item>
<ripple android:color="@color/selection_color">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/selection_color" />
</shape>
</item>
</ripple>
</item>
</layer-list> </layer-list>

View file

@ -27,8 +27,7 @@
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:overScrollMode="ifContentScrolls">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -45,8 +44,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/ic_artist" tools:src="@drawable/ic_artist" />
tools:tint="@color/blue" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/artist_name" android:id="@+id/artist_name"
@ -56,9 +54,7 @@
android:layout_marginTop="@dimen/margin_medium" android:layout_marginTop="@dimen/margin_medium"
android:layout_marginEnd="@dimen/margin_medium" android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium" android:layout_marginStart="@dimen/margin_medium"
android:fontFamily="@font/inter_black"
android:text="@{artist.name}" android:text="@{artist.name}"
android:textSize="@dimen/detail_header_size_max"
app:autoSizeMaxTextSize="@dimen/detail_header_size_max" app:autoSizeMaxTextSize="@dimen/detail_header_size_max"
app:autoSizeMinTextSize="@dimen/detail_header_size_min" app:autoSizeMinTextSize="@dimen/detail_header_size_min"
app:autoSizeStepGranularity="@dimen/detail_header_size_increment" app:autoSizeStepGranularity="@dimen/detail_header_size_increment"
@ -67,8 +63,7 @@
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/artist_image" app:layout_constraintTop_toBottomOf="@+id/artist_image"
tools:text="Artist Name" tools:text="Artist Name" />
tools:textColor="@color/blue" />
<TextView <TextView
android:id="@+id/artist_genre" android:id="@+id/artist_genre"
@ -94,7 +89,6 @@
app:layout_constraintTop_toBottomOf="@+id/artist_genre" app:layout_constraintTop_toBottomOf="@+id/artist_genre"
tools:text="2 Albums, 20 Songs" /> tools:text="2 Albums, 20 Songs" />
<TextView <TextView
android:id="@+id/header_albums" android:id="@+id/header_albums"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -16,8 +16,7 @@
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:elevation="@dimen/elevation_normal" android:elevation="@dimen/elevation_normal"
app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold" app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold"
app:title="@string/title_library_fragment" app:title="@string/title_library_fragment" />
tools:titleTextColor="@color/blue" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/library_recycler" android:id="@+id/library_recycler"

View file

@ -27,8 +27,7 @@
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" app:layout_constraintVertical_chainStyle="packed" />
tools:indeterminateTint="@color/blue" />
<ImageView <ImageView
android:id="@+id/status_icon" android:id="@+id/status_icon"
@ -43,7 +42,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/loading_bar" app:layout_constraintTop_toBottomOf="@+id/loading_bar"
app:srcCompat="@drawable/ic_error" app:srcCompat="@drawable/ic_error"
tools:tint="@color/blue"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
<TextView <TextView
@ -78,7 +76,6 @@
app:layout_constraintTop_toBottomOf="@+id/error_text" app:layout_constraintTop_toBottomOf="@+id/error_text"
app:layout_constraintBottom_toTopOf="@+id/grant_button" app:layout_constraintBottom_toTopOf="@+id/grant_button"
app:layout_constraintVertical_bias="0.673" app:layout_constraintVertical_bias="0.673"
tools:textColor="@color/blue"
tools:visibility="visible" /> tools:visibility="visible" />
<Button <Button
@ -95,7 +92,6 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/retry_button" app:layout_constraintTop_toBottomOf="@+id/retry_button"
tools:textColor="@color/blue"
tools:visibility="visible" /> tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -16,8 +16,7 @@
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:elevation="@dimen/elevation_normal" android:elevation="@dimen/elevation_normal"
app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold" app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold"
app:title="@string/title_all_songs" app:title="@string/title_all_songs" />
tools:titleTextColor="@color/blue" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/song_recycler" android:id="@+id/song_recycler"

View file

@ -27,8 +27,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" tools:ignore="ContentDescription"
tools:src="@drawable/ic_album" tools:src="@drawable/ic_album" />
tools:tint="@color/blue" />
<TextView <TextView
android:id="@+id/album_name" android:id="@+id/album_name"

View file

@ -28,8 +28,7 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:artistImage="@{artist}" app:artistImage="@{artist}"
tools:ignore="ContentDescription" tools:ignore="ContentDescription"
tools:src="@drawable/ic_artist" tools:src="@drawable/ic_artist" />
tools:tint="@color/blue" />
<TextView <TextView
android:id="@+id/artist_name" android:id="@+id/artist_name"

View file

@ -27,8 +27,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" tools:ignore="ContentDescription"
tools:src="@drawable/ic_song" tools:src="@drawable/ic_song" />
tools:tint="@color/blue" />
<TextView <TextView
android:id="@+id/song_name" android:id="@+id/song_name"

View file

@ -12,6 +12,8 @@
<action <action
android:id="@+id/action_to_main" android:id="@+id/action_to_main"
app:destination="@id/main_fragment" app:destination="@id/main_fragment"
app:enterAnim="@anim/fragment_fade_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popUpTo="@id/loading_fragment" app:popUpTo="@id/loading_fragment"
app:popUpToInclusive="true" /> app:popUpToInclusive="true" />
</fragment> </fragment>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background">#151515</color>
<color name="divider_color">#323232</color>
<color name="selection_color">#484848</color>
<!--
Base color set derived from Music Player GO.
https://github.com/enricocid/Music-Player-GO
-->
<color name="red">#ef9a9a</color>
<color name="pink">#f48fb1</color>
<color name="purple">#ce93d8</color>
<color name="deep_purple">#b39ddb</color>
<color name="indigo">#9fa8da</color>
<color name="blue">#90caf9</color>
<color name="light_blue">#81d4fa</color>
<color name="cyan">#80deea</color>
<color name="teal">#80cbc4</color>
<color name="green">#a5d6a7</color>
<color name="light_green">#c5e1a5</color>
<color name="lime">#e6ee9c</color>
<color name="yellow">#fff59d</color>
<color name="amber">#ffe082</color>
<color name="orange">#ffcc80</color>
<color name="deep_orange">#ffab91</color>
<color name="brown">#bcaaa4</color>
<color name="grey">#eeeeee</color>
<color name="blue_grey">#b0bec5</color>
</resources>

View file

@ -1,30 +1,30 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="background">#151515</color> <color name="background">#fafafa</color>
<color name="divider_color">#323232</color> <color name="divider_color">#cbcbcb</color>
<color name="selection_color">#484848</color> <color name="selection_color">#cbcbcb</color>
<!-- <!--
Base color set derived from Music Player GO. Base color set derived from Music Player GO.
https://github.com/enricocid/Music-Player-GO https://github.com/enricocid/Music-Player-GO
--> -->
<color name="red">#ef9a9a</color> <color name="red">#f44336</color>
<color name="pink">#f48fb1</color> <color name="pink">#e91e63</color>
<color name="purple">#ce93d8</color> <color name="purple">#9c27b0</color>
<color name="deep_purple">#b39ddb</color> <color name="deep_purple">#673ab7</color>
<color name="indigo">#9fa8da</color> <color name="indigo">#3f51b5</color>
<color name="blue">#90caf9</color> <color name="blue">#2196f3</color>
<color name="light_blue">#81d4fa</color> <color name="light_blue">#03a9f4</color>
<color name="cyan">#80deea</color> <color name="cyan">#00bcd4</color>
<color name="teal">#80cbc4</color> <color name="teal">#009688</color>
<color name="green">#a5d6a7</color> <color name="green">#4caf50</color>
<color name="light_green">#c5e1a5</color> <color name="light_green">#8bc34a</color>
<color name="lime">#e6ee9c</color> <color name="lime">#cddc39</color>
<color name="yellow">#fff59d</color> <color name="yellow">#ffeb3b</color>
<color name="amber">#ffe082</color> <color name="amber">#ffc107</color>
<color name="orange">#ffcc80</color> <color name="orange">#ff9800</color>
<color name="deep_orange">#ffab91</color> <color name="deep_orange">#ff5722</color>
<color name="brown">#bcaaa4</color> <color name="brown">#795548</color>
<color name="grey">#eeeeee</color> <color name="grey">#9e9e9e</color>
<color name="blue_grey">#b0bec5</color> <color name="blue_grey">#607d8b</color>
</resources> </resources>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Base theme --> <!-- Base theme -->
<style name="Theme.Base" parent="Theme.AppCompat.NoActionBar"> <style name="Theme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:windowBackground">@color/background</item> <item name="android:windowBackground">@color/background</item>
<item name="android:statusBarColor">@android:color/black</item> <item name="android:statusBarColor">@android:color/black</item>
<item name="android:fontFamily">@font/inter</item> <item name="android:fontFamily">@font/inter</item>
@ -16,5 +16,6 @@
<item name="android:textAppearance">?android:attr/textAppearanceLarge</item> <item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
<item name="android:textColor">?android:attr/colorPrimary</item> <item name="android:textColor">?android:attr/colorPrimary</item>
<item name="android:fontFamily">@font/inter_black</item> <item name="android:fontFamily">@font/inter_black</item>
<item name="android:textSize">@dimen/detail_header_size_max</item>
</style> </style>
</resources> </resources>

View file

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!--
All the base themes/accents.
-->
<style name="Theme.Red" parent="Theme.Base"> <style name="Theme.Red" parent="Theme.Base">
<item name="colorPrimary">@color/red</item> <item name="colorPrimary">@color/red</item>
<item name="colorSecondary">@color/red</item> <item name="colorSecondary">@color/red</item>