Migrate to material theming

Finally move the app from AppCompat the Material Bridge theme. This does a couple things:
- Removes need for runtime styling of material widgets used before
- Allows for a better dialog style [But only after a ton of tinkering and weird hacks]
- Makes theming slightly easier [After all the dumb migration bugs and technicalities are fixed]

I never want to do something like this again. UI styling on android is a nightmare.
This commit is contained in:
OxygenCobalt
2021-04-04 09:20:56 -06:00
parent f2445e56f2
commit 03aa2d4579
21 changed files with 95 additions and 102 deletions
@@ -17,6 +17,7 @@
android:fontFamily="@font/inter_exbold"
android:padding="@dimen/padding_medium"
android:text="@string/setting_accent"
android:paddingHorizontal="10dp"
android:textAlignment="viewStart"
android:textColor="?attr/colorPrimary"
android:textSize="@dimen/text_size_toolbar_header"
+2 -2
View File
@@ -24,9 +24,10 @@
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/search_text_layout"
style="@style/Theme.MaterialComponents.DayNight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:boxStrokeWidthFocused="2dp"
app:boxStrokeColor="?attr/colorPrimary"
app:boxBackgroundMode="filled"
app:boxStrokeWidth="0dp"
app:endIconContentDescription="@string/description_clear_search"
@@ -36,7 +37,6 @@
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/search_edit_text"
style="@style/Widget.AppCompat.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
@@ -84,19 +84,18 @@
android:text="@string/label_play"
app:layout_constraintEnd_toStartOf="@+id/album_shuffle_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/album_details"
tools:textColor="@color/control_color" />
app:layout_constraintTop_toBottomOf="@+id/album_details" />
<com.google.android.material.button.MaterialButton
android:id="@+id/album_shuffle_button"
style="@style/Widget.MaterialComponents.Button.Highlighted"
android:onClick="@{() -> playbackModel.playAlbum(album, true)}"
android:text="@string/label_shuffle"
android:backgroundTint="?attr/colorPrimary"
app:layout_constraintBottom_toBottomOf="@+id/album_play_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/album_play_button"
app:layout_constraintTop_toTopOf="@+id/album_play_button"
tools:backgroundTint="@color/control_color" />
app:layout_constraintTop_toTopOf="@+id/album_play_button" />
<TextView
android:id="@+id/album_song_header"
@@ -83,19 +83,18 @@
android:text="@string/label_play"
app:layout_constraintEnd_toStartOf="@+id/artist_shuffle_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/artist_counts"
tools:textColor="@color/control_color" />
app:layout_constraintTop_toBottomOf="@+id/artist_counts" />
<com.google.android.material.button.MaterialButton
android:id="@+id/artist_shuffle_button"
style="@style/Widget.MaterialComponents.Button.Highlighted"
android:onClick="@{() -> playbackModel.playArtist(artist, true)}"
android:text="@string/label_shuffle"
android:backgroundTint="?attr/colorPrimary"
app:layout_constraintBottom_toBottomOf="@+id/artist_play_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/artist_play_button"
app:layout_constraintTop_toTopOf="@+id/artist_play_button"
tools:backgroundTint="@color/control_color" />
app:layout_constraintTop_toTopOf="@+id/artist_play_button" />
<TextView
android:id="@+id/artist_album_header"
@@ -84,19 +84,18 @@
android:text="@string/label_play"
app:layout_constraintEnd_toStartOf="@+id/genre_shuffle_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/genre_duration"
tools:textColor="@color/control_color" />
app:layout_constraintTop_toBottomOf="@+id/genre_duration" />
<com.google.android.material.button.MaterialButton
android:id="@+id/genre_shuffle_button"
style="@style/Widget.MaterialComponents.Button.Highlighted"
android:onClick="@{() -> playbackModel.playGenre(genre, true)}"
android:text="@string/label_shuffle"
android:backgroundTint="?attr/colorPrimary"
app:layout_constraintBottom_toBottomOf="@+id/genre_play_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/genre_play_button"
app:layout_constraintTop_toTopOf="@+id/genre_play_button"
tools:backgroundTint="@color/control_color" />
app:layout_constraintTop_toTopOf="@+id/genre_play_button" />
<TextView
android:id="@+id/genre_song_header"