Improved alignments & Add classic player'

main
Hemanth S 2020-05-06 19:49:16 +05:30
parent 21d59f0274
commit c3c5f7e829
14 changed files with 217 additions and 190 deletions

View File

@ -263,7 +263,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
.dontTransform() .dontTransform()
.into(object : RetroMusicColoredTarget(image) { .into(object : RetroMusicColoredTarget(image) {
override fun onColorReady(colors: MediaNotificationProcessor) { override fun onColorReady(colors: MediaNotificationProcessor) {
setColors(colors.backgroundColor) setColors(colors.primaryTextColor)
} }
}) })
} }
@ -348,8 +348,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
R.id.action_sort_order_title -> sortOrder = AlbumSongSortOrder.SONG_A_Z R.id.action_sort_order_title -> sortOrder = AlbumSongSortOrder.SONG_A_Z
R.id.action_sort_order_title_desc -> sortOrder = AlbumSongSortOrder.SONG_Z_A R.id.action_sort_order_title_desc -> sortOrder = AlbumSongSortOrder.SONG_Z_A
R.id.action_sort_order_track_list -> sortOrder = AlbumSongSortOrder.SONG_TRACK_LIST R.id.action_sort_order_track_list -> sortOrder = AlbumSongSortOrder.SONG_TRACK_LIST
R.id.action_sort_order_artist_song_duration -> sortOrder = R.id.action_sort_order_artist_song_duration -> sortOrder = AlbumSongSortOrder.SONG_DURATION
AlbumSongSortOrder.SONG_DURATION
} }
if (sortOrder != null) { if (sortOrder != null) {
item.isChecked = true item.isChecked = true

View File

@ -26,5 +26,5 @@ enum class NowPlayingScreen constructor(
PLAIN(R.string.plain, R.drawable.np_plain, 3), PLAIN(R.string.plain, R.drawable.np_plain, 3),
SIMPLE(R.string.simple, R.drawable.np_simple, 8), SIMPLE(R.string.simple, R.drawable.np_simple, 8),
TINY(R.string.tiny, R.drawable.np_tiny, 7), TINY(R.string.tiny, R.drawable.np_tiny, 7),
CLASSIC(R.string.classic, R.drawable.np_tiny, 16), CLASSIC(R.string.classic, R.drawable.np_classic, 16),
} }

View File

@ -476,6 +476,16 @@ public class MediaNotificationProcessor {
return backgroundColor; return backgroundColor;
} }
public int getMightyColor() {
if (isColorLight(backgroundColor)) {
return primaryTextColor;
} else if (isColorLight(primaryTextColor)) {
return secondaryTextColor;
} else {
return backgroundColor;
}
}
public interface OnPaletteLoadedListener { public interface OnPaletteLoadedListener {
void onPaletteLoaded(MediaNotificationProcessor mediaNotificationProcessor); void onPaletteLoaded(MediaNotificationProcessor mediaNotificationProcessor);
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -9,15 +9,23 @@
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusBarContainer">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
@ -30,101 +38,104 @@
android:layout_height="48dp" /> android:layout_height="48dp" />
</FrameLayout> </FrameLayout>
<LinearLayout
android:layout_width="match_parent" <com.google.android.material.card.MaterialCardView
android:layout_height="match_parent" android:id="@+id/albumCoverContainer"
android:orientation="horizontal"> android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:transitionName="@string/transition_album_art"
app:cardCornerRadius="24dp"
app:cardElevation="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/container"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbarContainer">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
</com.google.android.material.card.MaterialCardView>
<androidx.core.widget.NestedScrollView
android:id="@+id/container"
android:layout_width="0dp"
android:layout_height="0dp"
android:fillViewport="true"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/albumCoverContainer"
app:layout_constraintTop_toBottomOf="@id/toolbarContainer">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
android:id="@+id/albumCoverContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:transitionName="@string/transition_album_art"
app:cardCornerRadius="24dp"
app:cardElevation="8dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:gravity="center_vertical"
android:orientation="horizontal">
<code.name.monkey.retromusic.views.RetroShapeableImageView
android:id="@+id/artistImage"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="8dp"
android:scaleType="centerCrop"
app:retroCornerSize="26dp"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:layout_gravity="bottom"
android:orientation="horizontal"> android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:paddingBottom="8dp">
<code.name.monkey.retromusic.views.RetroShapeableImageView <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/artistImage" android:id="@+id/albumTitle"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="8dp"
android:scaleType="centerCrop"
app:retroCornerSize="26dp"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:maxLines="2"
android:layout_weight="1" android:textAppearance="@style/TextViewHeadline5"
android:orientation="vertical" android:textStyle="bold"
android:padding="16dp"> app:lineHeightHint="28sp"
tools:ignore="MissingPrefix"
<com.google.android.material.textview.MaterialTextView tools:text="Album name" />
android:id="@+id/albumTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="@style/TextViewHeadline5"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Album name" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingTop="4dp"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="MissingPrefix"
tools:text="Album details name" />
</LinearLayout>
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/albumText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingTop="4dp"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
app:lineHeightHint="24sp"
tools:ignore="MissingPrefix"
tools:text="Album details name" />
</LinearLayout> </LinearLayout>
<include layout="@layout/activity_album_content" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout> <include layout="@layout/activity_album_content" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -9,15 +9,23 @@
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusBarContainer">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
@ -30,91 +38,83 @@
android:layout_height="48dp" /> android:layout_height="48dp" />
</FrameLayout> </FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/artistCoverContainer"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:transitionName="@string/transition_artist_image"
app:cardCornerRadius="24dp"
app:cardElevation="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/container"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbarContainer">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:scaleType="centerCrop"
android:orientation="vertical"> tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
<com.google.android.material.card.MaterialCardView </com.google.android.material.card.MaterialCardView>
android:id="@+id/artistCoverContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:transitionName="@string/transition_artist_image"
app:cardCornerRadius="24dp"
app:cardElevation="8dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
</com.google.android.material.card.MaterialCardView> <androidx.core.widget.NestedScrollView
</LinearLayout> android:id="@+id/container"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/artistCoverContainer"
app:layout_constraintTop_toBottomOf="@id/toolbarContainer">
<androidx.core.widget.NestedScrollView <LinearLayout
android:id="@+id/container" android:id="@+id/background"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:orientation="vertical">
android:overScrollMode="never">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical"
android:padding="16dp">
<LinearLayout <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/background" android:id="@+id/artistTitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:maxLines="2"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Title" />
<LinearLayout <code.name.monkey.retromusic.views.BaselineGridTextView
android:layout_width="match_parent" android:id="@+id/text"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/artistTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="@style/TextViewHeadline5"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/activity_artist_content" />
</LinearLayout>
<View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_padding" /> android:layout_height="wrap_content"
android:paddingTop="4dp"
android:textAppearance="@style/TextViewSubtitle2"
android:textColor="?android:attr/textColorSecondary"
app:lineHeightHint="24sp"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout> <include layout="@layout/activity_artist_content" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -54,14 +54,17 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/albumCoverContainer" android:id="@+id/albumCoverContainer"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_margin="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:transitionName="@string/transition_album_art" android:transitionName="@string/transition_album_art"
app:cardCornerRadius="24dp" app:cardCornerRadius="24dp"
app:cardElevation="8dp" app:cardElevation="8dp"
app:layout_constraintDimensionRatio="1:1"
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">
@ -73,8 +76,7 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" /> tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
</code.name.monkey.retromusic.views.WidthFitSquareCardView> </com.google.android.material.card.MaterialCardView>
<code.name.monkey.retromusic.views.RetroShapeableImageView <code.name.monkey.retromusic.views.RetroShapeableImageView
android:id="@+id/artistImage" android:id="@+id/artistImage"
@ -88,7 +90,7 @@
app:retroCornerSize="26dp" app:retroCornerSize="26dp"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" /> tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<com.google.android.material.textview.MaterialTextView <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/albumTitle" android:id="@+id/albumTitle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -105,7 +107,7 @@
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="@tools:sample/lorem/random" /> tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/albumText" android:id="@+id/albumText"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -119,6 +121,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/artistImage" app:layout_constraintStart_toEndOf="@id/artistImage"
app:layout_constraintTop_toBottomOf="@id/albumTitle" app:layout_constraintTop_toBottomOf="@id/albumTitle"
app:lineHeightHint="24sp"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="@tools:sample/lorem/random" /> tools:text="@tools:sample/lorem/random" />

View File

@ -10,7 +10,7 @@
android:id="@+id/playAction" android:id="@+id/playAction"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="16dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/action_play_all" android:text="@string/action_play_all"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
@ -26,7 +26,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="16dp"
android:text="@string/shuffle" android:text="@string/shuffle"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
app:backgroundTint="?attr/colorSurface" app:backgroundTint="?attr/colorSurface"

View File

@ -10,7 +10,7 @@
android:id="@+id/playAction" android:id="@+id/playAction"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="16dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:text="@string/action_play_all" android:text="@string/action_play_all"
app:backgroundTint="?attr/colorSurface" app:backgroundTint="?attr/colorSurface"
@ -25,7 +25,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="16dp"
android:text="@string/shuffle" android:text="@string/shuffle"
app:backgroundTint="?attr/colorSurface" app:backgroundTint="?attr/colorSurface"
app:icon="@drawable/ic_shuffle_white_24dp" app:icon="@drawable/ic_shuffle_white_24dp"
@ -39,7 +39,7 @@
android:id="@+id/albumTitle" android:id="@+id/albumTitle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="12dp" android:padding="16dp"
android:text="@string/albums" android:text="@string/albums"
android:textAppearance="@style/TextViewHeadline6" android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold" android:textStyle="bold"

View File

@ -54,14 +54,17 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/artistCoverContainer" android:id="@+id/artistCoverContainer"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_margin="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:transitionName="@string/transition_artist_image" android:transitionName="@string/transition_artist_image"
app:cardCornerRadius="24dp" app:cardCornerRadius="24dp"
app:cardElevation="8dp" app:cardElevation="8dp"
app:layout_constraintDimensionRatio="1:1"
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">
@ -73,10 +76,10 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" /> tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
</code.name.monkey.retromusic.views.WidthFitSquareCardView> </com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/artistTitle" android:id="@+id/artistTitle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -93,7 +96,7 @@
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Title" /> tools:text="Title" />
<com.google.android.material.textview.MaterialTextView <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/text" android:id="@+id/text"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -18,8 +18,8 @@
</FrameLayout> </FrameLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:id="@+id/mainContent" android:id="@+id/mainContent"
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
@ -35,8 +35,10 @@
android:id="@+id/toolbarContainer" android:id="@+id/toolbarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:cardCornerRadius="8dp"
app:layout_scrollFlags="scroll|enterAlways"> app:layout_scrollFlags="scroll|enterAlways">
<FrameLayout <FrameLayout
@ -49,8 +51,8 @@
android:layout_height="@dimen/toolbar_height" android:layout_height="@dimen/toolbar_height"
android:background="?attr/colorSurface" android:background="?attr/colorSurface"
app:popupTheme="?attr/toolbarPopupTheme" app:popupTheme="?attr/toolbarPopupTheme"
app:titleTextColor="?attr/colorControlNormal"
app:titleTextAppearance="@style/TextViewHeadline6" app:titleTextAppearance="@style/TextViewHeadline6"
app:titleTextColor="?attr/colorControlNormal"
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
@ -59,8 +61,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="@string/app_name" android:text="@string/app_name"
android:textColor="?attr/colorControlNormal" android:textAppearance="@style/TextViewHeadline6"
android:textAppearance="@style/TextViewHeadline6" /> android:textColor="?attr/colorControlNormal" />
</androidx.appcompat.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
<ViewStub <ViewStub

View File

@ -7,7 +7,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="12dp"
tools:ignore="MissingPrefix"> tools:ignore="MissingPrefix">
@ -159,6 +158,7 @@
android:id="@+id/playPauseButton" android:id="@+id/playPauseButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer" app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintEnd_toStartOf="@+id/nextButton" app:layout_constraintEnd_toStartOf="@+id/nextButton"

View File

@ -18,15 +18,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="8dp" >
android:paddingEnd="8dp">
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/playAction" android:id="@+id/playAction"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="16dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="2dp"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/action_play_all" android:text="@string/action_play_all"
app:backgroundTint="?attr/colorSurface" app:backgroundTint="?attr/colorSurface"
@ -36,8 +35,8 @@
android:id="@+id/shuffleAction" android:id="@+id/shuffleAction"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="16dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="2dp"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/shuffle" android:text="@string/shuffle"
app:backgroundTint="?attr/colorSurface" app:backgroundTint="?attr/colorSurface"