From e49bea1cc9c73ed5e9ada5014a5c25b0bb2cb797 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Fri, 8 Nov 2019 21:08:34 +0530 Subject: [PATCH] Improved album and artist detaisl UI --- .../activities/AlbumDetailsActivity.kt | 60 ++---- .../activities/ArtistDetailActivity.kt | 56 ++---- .../activities/base/AbsThemeActivity.kt | 4 +- .../retromusic/extensions/ActivityEx.kt | 3 +- .../settings/PersonaizeSettingsFragment.kt | 4 +- .../main/res/layout-land/activity_album.xml | 147 +++++++------- .../layout-land/activity_artist_details.xml | 117 +++++------ app/src/main/res/layout/activity_album.xml | 185 +++++++++--------- .../res/layout/activity_album_content.xml | 111 ++++++----- .../res/layout/activity_artist_content.xml | 114 ++++++----- .../res/layout/activity_artist_details.xml | 158 ++++++++------- .../res/layout/activity_playlist_detail.xml | 2 - .../main/res/layout/fragment_peak_player.xml | 11 +- .../res/layout/item_list_quick_actions.xml | 4 +- app/src/main/res/values/dimens.xml | 3 +- 15 files changed, 480 insertions(+), 499 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt index 5ec3e634..e0340aab 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt @@ -2,7 +2,6 @@ package code.name.monkey.retromusic.activities import android.app.ActivityOptions import android.content.Intent -import android.content.res.ColorStateList import android.graphics.Color import android.os.Bundle import android.transition.Slide @@ -16,7 +15,6 @@ import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.MaterialUtil -import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.retromusic.App import code.name.monkey.retromusic.R import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity @@ -32,7 +30,6 @@ import code.name.monkey.retromusic.glide.RetroMusicColoredTarget import code.name.monkey.retromusic.glide.SongGlideRequest import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.SortOrder.AlbumSongSortOrder -import code.name.monkey.retromusic.misc.AppBarStateChangeListener import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.mvp.presenter.AlbumDetailsPresenter @@ -40,9 +37,7 @@ import code.name.monkey.retromusic.mvp.presenter.AlbumDetailsView import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.PreferenceUtil -import code.name.monkey.retromusic.util.RetroUtil import com.bumptech.glide.Glide -import com.google.android.material.appbar.AppBarLayout import io.reactivex.disposables.CompositeDisposable import kotlinx.android.synthetic.main.activity_album.* import kotlinx.android.synthetic.main.activity_album_content.* @@ -66,6 +61,9 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView { private fun setupWindowTransition() { val slide = Slide(Gravity.BOTTOM) + slide.excludeTarget(android.R.id.statusBarBackground, true) + slide.excludeTarget(android.R.id.navigationBarBackground, true) + slide.excludeTarget(toolbar, true) slide.interpolator = AnimationUtils.loadInterpolator(this, android.R.interpolator.linear_out_slow_in) window.enterTransition = slide } @@ -77,19 +75,19 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView { setDrawUnderStatusBar() setupWindowTransition() super.onCreate(savedInstanceState) - App.musicComponent.inject(this) toggleBottomNavigationView(true) - setLightNavigationBar(true) + setStatusbarColor(Color.TRANSPARENT) setNavigationbarColorAuto() + setTaskDescriptionColorAuto() + setLightNavigationBar(true) + setLightStatusbar(ColorUtil.isColorLight(ATHUtil.resolveColor(this, R.attr.colorPrimary))) - contentContainer?.setCardBackgroundColor(ColorStateList.valueOf(ATHUtil.resolveColor(this, R.attr.colorPrimary))) - + App.musicComponent.inject(this) postponeEnterTransition() artistImage = findViewById(R.id.artistImage) setupRecyclerView() - setupToolbarMarginHeight() artistImage.setOnClickListener { val artistPairs = ActivityOptions.makeSceneTransitionAnimation(this, UtilPair.create(artistImage, getString(R.string.transition_artist_image))) @@ -122,43 +120,6 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView { } } - private fun setupToolbarMarginHeight() { - setSupportActionBar(toolbar) - supportActionBar?.title = null - val primaryColor = ATHUtil.resolveColor(this, R.attr.colorPrimary) - collapsingToolbarLayout?.let { - it.setContentScrimColor(primaryColor) - it.setStatusBarScrimColor(ColorUtil.darkenColor(primaryColor)) - } - - - toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp) - - if (toolbar != null && !PreferenceUtil.getInstance(this).fullScreenMode) { - val params = toolbar.layoutParams as ViewGroup.MarginLayoutParams - params.topMargin = RetroUtil.getStatusBarHeight() - toolbar.layoutParams = params - } - - appBarLayout?.apply { - addOnOffsetChangedListener(object : AppBarStateChangeListener() { - override fun onStateChanged(appBarLayout: AppBarLayout, state: State) { - val color: Int = when (state) { - State.COLLAPSED -> { - setLightStatusbar(ColorUtil.isColorLight(primaryColor)) - primaryColor - } - State.EXPANDED, State.IDLE -> { - setLightStatusbar(false) - Color.TRANSPARENT - } - } - ToolbarContentTintHelper.setToolbarContentColorBasedOnToolbarColor(this@AlbumDetailsActivity, toolbar, color) - } - }) - } - } - override fun onDestroy() { super.onDestroy() disposable.dispose() @@ -244,7 +205,10 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView { MaterialUtil.setTint(button = shuffleAction, color = buttonColor) MaterialUtil.setTint(button = playAction, color = buttonColor) - ToolbarContentTintHelper.setToolbarContentColorBasedOnToolbarColor(this@AlbumDetailsActivity, toolbar, color) + toolbar.setBackgroundColor(ATHUtil.resolveColor(this, R.attr.colorPrimary)) + setSupportActionBar(toolbar) + supportActionBar?.title = null + } diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt index 7cd2efb4..8fb33851 100755 --- a/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt @@ -2,14 +2,16 @@ package code.name.monkey.retromusic.activities import android.app.Activity import android.content.Intent -import android.content.res.ColorStateList import android.graphics.Color import android.os.Build import android.os.Bundle import android.text.Html import android.text.Spanned import android.transition.Slide -import android.view.* +import android.view.Gravity +import android.view.Menu +import android.view.MenuItem +import android.view.View import android.view.animation.AnimationUtils import android.widget.Toast import androidx.core.app.ActivityCompat @@ -20,7 +22,6 @@ import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.MaterialUtil -import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.retromusic.App import code.name.monkey.retromusic.R import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity @@ -31,7 +32,6 @@ import code.name.monkey.retromusic.dialogs.AddToPlaylistDialog import code.name.monkey.retromusic.glide.ArtistGlideRequest import code.name.monkey.retromusic.glide.RetroMusicColoredTarget import code.name.monkey.retromusic.helper.MusicPlayerRemote -import code.name.monkey.retromusic.misc.AppBarStateChangeListener import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.mvp.presenter.ArtistDetailsPresenter import code.name.monkey.retromusic.mvp.presenter.ArtistDetailsView @@ -39,7 +39,6 @@ import code.name.monkey.retromusic.rest.LastFMRestClient import code.name.monkey.retromusic.rest.model.LastFmArtist import code.name.monkey.retromusic.util.* import com.bumptech.glide.Glide -import com.google.android.material.appbar.AppBarLayout import kotlinx.android.synthetic.main.activity_artist_content.* import kotlinx.android.synthetic.main.activity_artist_details.* import java.util.* @@ -72,10 +71,12 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView { setDrawUnderStatusBar() setupWindowTransitions() super.onCreate(savedInstanceState) - contentContainer?.setCardBackgroundColor(ColorStateList.valueOf(ATHUtil.resolveColor(this, R.attr.colorPrimary))) toggleBottomNavigationView(true) + setStatusbarColor(Color.TRANSPARENT) setNavigationbarColorAuto() + setTaskDescriptionColorAuto() setLightNavigationBar(true) + setLightStatusbar(ColorUtil.isColorLight(ATHUtil.resolveColor(this, R.attr.colorPrimary))) ActivityCompat.postponeEnterTransition(this) @@ -115,7 +116,6 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView { private fun setUpViews() { setupRecyclerView() - setupToolbarMarginHeight() setupContainerHeight() } @@ -127,42 +127,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView { } } - private fun setupToolbarMarginHeight() { - val primaryColor = ATHUtil.resolveColor(this, R.attr.colorPrimary) - collapsingToolbarLayout?.let { - it.setContentScrimColor(primaryColor) - it.setStatusBarScrimColor(ColorUtil.darkenColor(primaryColor)) - } - toolbar?.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp) - setSupportActionBar(toolbar) - - supportActionBar?.title = null - - if (toolbar != null && !PreferenceUtil.getInstance(this).fullScreenMode) { - val params = toolbar!!.layoutParams as ViewGroup.MarginLayoutParams - params.topMargin = RetroUtil.getStatusBarHeight() - toolbar!!.layoutParams = params - } - - appBarLayout?.addOnOffsetChangedListener(object : AppBarStateChangeListener() { - override fun onStateChanged(appBarLayout: AppBarLayout, state: State) { - val color: Int = when (state) { - State.COLLAPSED -> { - setLightStatusbar(ColorUtil.isColorLight(primaryColor)) - primaryColor - } - State.EXPANDED, State.IDLE -> { - setLightStatusbar(false) - Color.TRANSPARENT - } - - } - ToolbarContentTintHelper.setToolbarContentColorBasedOnToolbarColor(appBarLayout.context, toolbar, color) - } - }) - setColors(ThemeStore.accentColor(this)) - } private fun setupRecyclerView() { albumAdapter = HorizontalAlbumAdapter(this, ArrayList(), false, null) @@ -261,7 +226,8 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView { private fun setColors(color: Int) { - val textColor = if (PreferenceUtil.getInstance(this).adaptiveColor) color else ThemeStore.accentColor(this) + val textColor = if (PreferenceUtil.getInstance(this).adaptiveColor) color + else ThemeStore.accentColor(this) albumTitle.setTextColor(textColor) songTitle.setTextColor(textColor) @@ -272,6 +238,10 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView { MaterialUtil.setTint(button = shuffleAction, color = buttonColor) MaterialUtil.setTint(button = playAction, color = buttonColor) + + toolbar.setBackgroundColor(ATHUtil.resolveColor(this, R.attr.colorPrimary)) + setSupportActionBar(toolbar) + supportActionBar?.title = null } diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt index 022198c5..7d802ec1 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt @@ -10,8 +10,8 @@ import android.view.WindowManager import androidx.annotation.ColorInt import androidx.core.content.ContextCompat import code.name.monkey.appthemehelper.ATH -import code.name.monkey.appthemehelper.ATHActivity import code.name.monkey.appthemehelper.ThemeStore +import code.name.monkey.appthemehelper.common.ATHToolbarActivity import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.TintHelper @@ -21,7 +21,7 @@ import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.ThemeManager -abstract class AbsThemeActivity : ATHActivity(), Runnable { +abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable { private val handler = Handler() diff --git a/app/src/main/java/code/name/monkey/retromusic/extensions/ActivityEx.kt b/app/src/main/java/code/name/monkey/retromusic/extensions/ActivityEx.kt index fc286a48..48ab522a 100644 --- a/app/src/main/java/code/name/monkey/retromusic/extensions/ActivityEx.kt +++ b/app/src/main/java/code/name/monkey/retromusic/extensions/ActivityEx.kt @@ -24,8 +24,9 @@ fun AppCompatActivity.applyToolbar(toolbar: Toolbar) { toolbar.apply { setNavigationOnClickListener { onBackPressed() } setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp) - ToolbarContentTintHelper.colorBackButton(toolbar ) + ToolbarContentTintHelper.colorBackButton(toolbar) setBackgroundColor(ATHUtil.resolveColor(this@applyToolbar, R.attr.colorPrimary)) + } setSupportActionBar(toolbar) } \ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/PersonaizeSettingsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/PersonaizeSettingsFragment.kt index 5534b0bd..d76e5a09 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/PersonaizeSettingsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/PersonaizeSettingsFragment.kt @@ -33,12 +33,12 @@ class PersonaizeSettingsFragment : AbsSettingsFragment(), SharedPreferences.OnSh showProToastAndNavigate(activity!!.getString(R.string.pref_title_round_corners)) return@setOnPreferenceChangeListener false } - activity!!.recreate() + requireActivity().recreate() return@setOnPreferenceChangeListener true } val toggleFullScreen: TwoStatePreference = findPreference("toggle_full_screen")!! toggleFullScreen.setOnPreferenceChangeListener { _, _ -> - activity!!.recreate() + requireActivity().recreate() true } } diff --git a/app/src/main/res/layout-land/activity_album.xml b/app/src/main/res/layout-land/activity_album.xml index c9e3fb11..a08a8304 100644 --- a/app/src/main/res/layout-land/activity_album.xml +++ b/app/src/main/res/layout-land/activity_album.xml @@ -1,34 +1,53 @@ - + android:orientation="vertical" + tools:ignore="UnusedAttribute"> + + + + + - - - + android:layout_weight="1" + android:orientation="vertical"> - + style="@style/Toolbar" + app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" /> + + + + + + + + - + android:orientation="vertical"> + android:gravity="center_vertical" + android:orientation="horizontal"> + + + android:layout_gravity="bottom" + android:layout_weight="1" + android:orientation="vertical" + android:padding="16dp"> - - - + android:maxLines="2" + android:textAppearance="@style/TextViewHeadline6" + android:textStyle="bold" + tools:ignore="MissingPrefix" + tools:text="Album name" /> - - - - - + - - + + + + - + diff --git a/app/src/main/res/layout-land/activity_artist_details.xml b/app/src/main/res/layout-land/activity_artist_details.xml index 5abddc82..fbd61a48 100644 --- a/app/src/main/res/layout-land/activity_artist_details.xml +++ b/app/src/main/res/layout-land/activity_artist_details.xml @@ -1,35 +1,52 @@ - + android:layout_height="match_parent" + android:orientation="vertical" + tools:ignore="UnusedAttribute"> + + + + + - - - + android:layout_weight="1" + android:orientation="vertical"> + style="@style/Toolbar" + app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" /> + - + + + + - + android:orientation="vertical"> + android:orientation="vertical" + android:padding="16dp"> - + android:maxLines="2" + android:textAppearance="@style/TextViewHeadline6" + android:textStyle="bold" + tools:ignore="MissingPrefix" + tools:text="Title" /> - + - - - - - - - + - + + + + - - - + diff --git a/app/src/main/res/layout/activity_album.xml b/app/src/main/res/layout/activity_album.xml index d9d1f209..0f9b47cb 100755 --- a/app/src/main/res/layout/activity_album.xml +++ b/app/src/main/res/layout/activity_album.xml @@ -1,122 +1,125 @@ - + android:layout_height="match_parent" + android:orientation="vertical" + tools:ignore="UnusedAttribute"> - + android:layout_height="wrap_content"> - + + + + + - - - - - - - - + app:liftOnScroll="true"> - - + app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" /> - + - + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - - + android:transitionName="@string/transition_album_art" + app:cardCornerRadius="24dp" + app:cardElevation="8dp" + app:cardUseCompatPadding="true" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> - - - + android:layout_height="match_parent" + android:scaleType="centerCrop" + tools:srcCompat="@tools:sample/backgrounds/scenic[5]" /> - + - - - + - - - - - \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_album_content.xml b/app/src/main/res/layout/activity_album_content.xml index f26c5af4..11bada17 100644 --- a/app/src/main/res/layout/activity_album_content.xml +++ b/app/src/main/res/layout/activity_album_content.xml @@ -1,76 +1,83 @@ - - + android:layout_marginStart="@dimen/button_margin_horizontal" + android:layout_marginTop="8dp" + android:layout_marginEnd="@dimen/button_margin_horizontal" + android:layout_marginBottom="8dp" + android:paddingTop="@dimen/button_padding_vertical" + android:paddingBottom="@dimen/button_padding_vertical" + android:text="@string/action_play_all" + android:textAllCaps="false" + android:textAppearance="@style/TextViewNormal" + app:cornerRadius="@dimen/button_corner" + app:icon="@drawable/ic_play_arrow_white_24dp" + app:iconGravity="textStart" + app:layout_constraintEnd_toStartOf="@+id/shuffleAction" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - + - - - + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/songs" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/playAction" /> @@ -80,10 +87,16 @@ android:layout_height="wrap_content" android:nestedScrollingEnabled="false" android:visibility="gone" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/moreTitle" tools:listitem="@layout/item_album_card" tools:visibility="visible" /> - \ No newline at end of file + android:layout_height="72dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/moreRecyclerView" /> + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_artist_content.xml b/app/src/main/res/layout/activity_artist_content.xml index 27d587d2..d5b60e30 100644 --- a/app/src/main/res/layout/activity_artist_content.xml +++ b/app/src/main/res/layout/activity_artist_content.xml @@ -1,65 +1,59 @@ - - + android:layout_marginStart="@dimen/button_margin_horizontal" + android:layout_marginEnd="@dimen/button_margin_horizontal" + android:paddingTop="@dimen/button_padding_vertical" + android:paddingBottom="@dimen/button_padding_vertical" + android:text="@string/action_play_all" + android:textAllCaps="false" + android:textAppearance="@style/TextViewNormal" + app:cornerRadius="@dimen/button_corner" + app:icon="@drawable/ic_play_arrow_white_24dp" + app:iconGravity="textStart" + app:layout_constraintEnd_toStartOf="@+id/shuffleAction" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - + - - - + android:text="@string/albums" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/biographyText" /> + android:nestedScrollingEnabled="false" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/albumTitle" + tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager" + tools:listitem="@layout/item_album_card" + tools:spanCount="3" /> + android:text="@string/songs" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/albumRecyclerView" /> + android:nestedScrollingEnabled="false" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/songTitle" + tools:listitem="@layout/item_song" /> - \ No newline at end of file + android:layout_height="72dp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/recyclerView" /> + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_artist_details.xml b/app/src/main/res/layout/activity_artist_details.xml index 6bec3cfd..ed0c9a0c 100755 --- a/app/src/main/res/layout/activity_artist_details.xml +++ b/app/src/main/res/layout/activity_artist_details.xml @@ -1,105 +1,111 @@ - + android:layout_height="match_parent" + android:orientation="vertical" + tools:ignore="UnusedAttribute"> - + android:layout_height="wrap_content"> - + + + + + - - - - - - - - + app:liftOnScroll="true"> - - + app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" /> - + - + android:overScrollMode="never" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - - + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:transitionName="@string/transition_artist_image" + app:cardCornerRadius="24dp" + app:cardElevation="8dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> - + android:layout_height="match_parent" + android:scaleType="centerCrop" + tools:srcCompat="@tools:sample/backgrounds/scenic[16]" /> - - - - + - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_playlist_detail.xml b/app/src/main/res/layout/activity_playlist_detail.xml index ff015bac..76c13e22 100644 --- a/app/src/main/res/layout/activity_playlist_detail.xml +++ b/app/src/main/res/layout/activity_playlist_detail.xml @@ -46,8 +46,6 @@ - - + @@ -48,7 +48,7 @@ android:text="@string/shuffle" android:textAllCaps="false" android:textAppearance="@style/TextViewNormal" - app:cornerRadius="6dp" + app:cornerRadius="@dimen/button_corner" app:icon="@drawable/ic_shuffle_white_24dp" app:iconGravity="textStart" /> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 42c15480..e8228ada 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -43,6 +43,7 @@ 0dp 52dp 10dp - 4dp + 16dp 14dp + 24dp