Redesign headers/menus
Redesign the header items so they look nicer, update the PopupMenus with some new things as well.
This commit is contained in:
@@ -112,14 +112,14 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/padding_medium"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
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:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
|
||||
android:textSize="16sp"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_details" />
|
||||
|
||||
<ImageButton
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
style="@style/DetailHeader"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:text="@{artist.name}"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
@@ -79,9 +79,9 @@
|
||||
android:id="@+id/artist_genre"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
app:artistGenre="@{artist}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_name"
|
||||
@@ -91,9 +91,9 @@
|
||||
android:id="@+id/artist_counts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
app:artistCounts="@{artist}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_genre"
|
||||
@@ -102,18 +102,17 @@
|
||||
<TextView
|
||||
android:id="@+id/artist_album_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/padding_medium"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
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_albums"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_counts" />
|
||||
|
||||
<ImageButton
|
||||
@@ -123,15 +122,15 @@
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:contentDescription="@string/description_sort_button"
|
||||
android:onClick="@{() -> detailModel.incrementArtistSortMode()}"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/margin_medium"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:onClick="@{() -> detailModel.incrementArtistSortMode()}"
|
||||
tools:src="@drawable/ic_sort_numeric_down"
|
||||
app:layout_constraintBottom_toTopOf="@+id/artist_album_recycler"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_counts" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_counts"
|
||||
tools:src="@drawable/ic_sort_numeric_down" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/artist_album_recycler"
|
||||
|
||||
@@ -104,18 +104,17 @@
|
||||
<TextView
|
||||
android:id="@+id/genre_artist_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/padding_medium"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
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_artists"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_song_count" />
|
||||
|
||||
<ImageButton
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
android:theme="@style/Toolbar.Style"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
android:id="@+id/header_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
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:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
|
||||
android:textSize="16sp"
|
||||
android:textSize="19sp"
|
||||
android:text="@{header.name}"
|
||||
tools:text="Songs" />
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_queue_add"
|
||||
android:title="@string/label_queue_add"
|
||||
android:icon="@drawable/ic_queue_add" />
|
||||
<item
|
||||
android:id="@+id/action_go_artist"
|
||||
android:title="@string/label_go_artist"
|
||||
android:icon="@drawable/ic_artist" />
|
||||
</menu>
|
||||
@@ -3,7 +3,7 @@
|
||||
<item
|
||||
android:id="@+id/action_queue_add"
|
||||
android:title="@string/label_queue_add"
|
||||
android:icon="@drawable/ic_user_queue" />
|
||||
android:icon="@drawable/ic_queue_add" />
|
||||
<item
|
||||
android:id="@+id/action_play_artist"
|
||||
android:title="@string/label_play_artist"
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<string name="label_play">Play</string>
|
||||
<string name="label_play_artist">Play from artist</string>
|
||||
<string name="label_play_album">Play from album</string>
|
||||
<string name="label_go_artist">Go to artist</string>
|
||||
<string name="label_queue">Queue</string>
|
||||
<string name="label_queue_add">Add to queue</string>
|
||||
<string name="label_queue_added">Added to queue</string>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<item name="android:textCursorDrawable">@drawable/ui_cursor</item>
|
||||
<item name="android:fitsSystemWindows">true</item>
|
||||
|
||||
<item name="android:popupMenuStyle">@style/Widget.CustomPopup</item>
|
||||
<item name="popupMenuStyle">@style/Widget.CustomPopup</item>
|
||||
<item name="colorControlNormal">@color/control_color</item>
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user