Refactor styles heavily

Move a bunch of UI elements into reusable styles, along with removing literal dimen resources.
This commit is contained in:
OxygenCobalt
2020-12-02 19:03:17 -07:00
parent 63630aa42e
commit 51b2749c06
45 changed files with 212 additions and 434 deletions
@@ -26,14 +26,8 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/album_toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="?android:attr/windowBackground"
android:elevation="@dimen/elevation_normal"
app:popupTheme="@style/AppThemeOverlay.Popup"
style="@style/Toolbar.Style.Icon"
app:menu="@menu/menu_album_actions"
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header"
app:navigationIcon="@drawable/ic_back"
app:title="@string/label_library" />
<androidx.core.widget.NestedScrollView
@@ -60,7 +54,7 @@
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/album_name"
style="@style/DetailHeader"
style="@style/DetailTitleText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
@@ -69,7 +63,7 @@
android:maxLines="1"
android:text="@{album.name}"
android:ellipsize="end"
app:autoSizeMaxTextSize="@dimen/text_size_header_max"
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
app:autoSizeMinTextSize="@dimen/text_size_min"
app:autoSizeStepGranularity="@dimen/text_size_increment"
app:autoSizeTextType="uniform"
@@ -109,32 +103,17 @@
<TextView
android:id="@+id/album_song_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_medium"
android:background="@drawable/ui_header_dividers"
android:fontFamily="@font/inter_semibold"
android:paddingStart="@dimen/padding_medium"
android:paddingTop="@dimen/padding_small"
android:paddingEnd="@dimen/padding_small"
android:paddingBottom="@dimen/padding_small"
android:text="@string/label_songs"
android:textColor="?android:attr/textColorPrimary"
android:textSize="19sp"
app:layout_constraintTop_toBottomOf="@+id/album_details"
app:layout_constraintStart_toStartOf="parent" />
<ImageButton
android:id="@+id/album_sort_button"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:background="@drawable/ui_header_dividers"
style="@style/HeaderAction"
android:contentDescription="@string/description_sort_button"
android:onClick="@{() -> detailModel.incrementAlbumSortMode()}"
android:paddingStart="@dimen/padding_medium"
android:paddingTop="@dimen/padding_small"
android:paddingEnd="@dimen/margin_medium"
android:paddingBottom="@dimen/padding_small"
app:layout_constraintBottom_toBottomOf="@+id/album_song_header"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/album_song_header"