Improved album and artist detaisl UI

This commit is contained in:
h4h13 2019-11-08 21:08:34 +05:30
parent e34ff6ff2b
commit e49bea1cc9
15 changed files with 480 additions and 499 deletions

View file

@ -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
}

View file

@ -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
}

View file

@ -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()

View file

@ -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)
}

View file

@ -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
}
}

View file

@ -1,34 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
android:orientation="vertical"
tools:ignore="UnusedAttribute">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:transitionName="@string/transition_album_art"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
android:layout_weight="1"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Toolbar" />
</FrameLayout>
style="@style/Toolbar"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
<com.google.android.material.card.MaterialCardView
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:layout_width="match_parent"
@ -37,77 +56,69 @@
android:fillViewport="true"
android:overScrollMode="never">
<com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
app:cardElevation="8dp"
app:shapeAppearanceOverlay="@style/TopCornerCardView">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:gravity="center_vertical"
android:orientation="horizontal">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/artistImage"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="8dp"
android:layout_weight="0"
app:civ_border="false"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:layout_gravity="bottom"
android:layout_weight="1"
android:orientation="vertical"
android:padding="16dp">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/artistImage"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="8dp"
android:layout_weight="0"
app:civ_border="false"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<LinearLayout
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
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" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="@style/TextViewHeadline6"
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:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:paddingTop="4dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6"
tools:ignore="MissingPrefix"
tools:text="Album details name" />
</LinearLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:paddingTop="4dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6"
tools:ignore="MissingPrefix"
tools:text="Album details name" />
</LinearLayout>
<include layout="@layout/activity_album_content" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_album_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,35 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="UnusedAttribute">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/artistImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_album_art"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
android:layout_weight="1"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Toolbar" />
style="@style/Toolbar"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
<com.google.android.material.card.MaterialCardView
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">
</FrameLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/artistImage"
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:layout_width="match_parent"
@ -37,67 +54,53 @@
android:layout_weight="1"
android:overScrollMode="never">
<com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="8dp"
android:layout_marginTop="6dp"
app:shapeAppearanceOverlay="@style/TopCornerCardView">
android:orientation="vertical">
<LinearLayout
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
<com.google.android.material.textview.MaterialTextView
android:id="@+id/artistTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:maxLines="2"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Title" />
<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/TextViewHeadline6"
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"
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"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/activity_artist_content" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_padding" />
<include layout="@layout/activity_artist_content" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_padding" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/shadow_down_strong" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,122 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="UnusedAttribute">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsingToolbarLayout"
<include layout="@layout/status_bar" />
</FrameLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:layout_collapseMode="parallax">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_album_art"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
<View
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/shadow_down_strong" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
app:liftOnScroll="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:behavior_overlapTop="30dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
app:cardElevation="8dp"
app:shapeAppearanceOverlay="@style/TopCornerCardView">
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
<code.name.monkey.retromusic.views.WidthFitSquareCardView
android:id="@+id/albumCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="12dp">
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">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/artistImage"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_weight="0"
app:civ_border="false"
app:civ_shadow="false"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<LinearLayout
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingEnd="0dp">
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Album name" />
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle2"
tools:ignore="MissingPrefix"
tools:text="Album details" />
</LinearLayout>
</LinearLayout>
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/artistImage"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_weight="0"
app:civ_border="false"
app:civ_shadow="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/albumCoverContainer"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<include layout="@layout/activity_album_content" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:maxLines="3"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/artistImage"
app:layout_constraintTop_toTopOf="@id/artistImage"
tools:ignore="MissingPrefix"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle2"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/artistImage"
app:layout_constraintTop_toBottomOf="@id/albumTitle"
tools:ignore="MissingPrefix"
tools:text="@tools:sample/lorem/random" />
<include
layout="@layout/activity_album_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/albumText" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -1,76 +1,83 @@
<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
<com.google.android.material.button.MaterialButton
android:id="@+id/playAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp">
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" />
<com.google.android.material.button.MaterialButton
android:id="@+id/playAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
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"
android:textAllCaps="false"
android:textAppearance="@style/TextViewNormal"
app:cornerRadius="6dp"
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"
tools:backgroundTint="@color/md_grey_900" />
<com.google.android.material.button.MaterialButton
android:id="@+id/shuffleAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
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/shuffle"
android:textAllCaps="false"
android:textAppearance="@style/TextViewNormal"
app:cornerRadius="@dimen/button_corner"
app:icon="@drawable/ic_shuffle_white_24dp"
app:iconGravity="textStart"
app:layout_constraintBottom_toBottomOf="@+id/playAction"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/playAction"
app:layout_constraintTop_toTopOf="@+id/playAction" />
<com.google.android.material.button.MaterialButton
android:id="@+id/shuffleAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
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/shuffle"
android:textAllCaps="false"
android:textAppearance="@style/TextViewNormal"
app:cornerRadius="6dp"
app:icon="@drawable/ic_shuffle_white_24dp"
app:iconGravity="textStart"
app:layout_constraintBottom_toBottomOf="@+id/playAction"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/playAction"
app:layout_constraintTop_toTopOf="@+id/playAction"
tools:backgroundTint="@color/md_grey_900" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/songTitle"
style="@style/SubTitleTextAppearance"
android:text="@string/songs" />
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" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/songTitle"
tools:listitem="@layout/item_song" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/moreTitle"
style="@style/SubTitleTextAppearance"
android:layout_width="0dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/recyclerView"
tools:text="More by Artist"
tools:visibility="visible" />
@ -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" />
<Space
android:layout_width="match_parent"
android:layout_height="72dp" />
</LinearLayout>
android:layout_height="72dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/moreRecyclerView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,65 +1,59 @@
<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
<com.google.android.material.button.MaterialButton
android:id="@+id/playAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp">
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" />
<com.google.android.material.button.MaterialButton
android:id="@+id/playAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
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="6dp"
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"
tools:backgroundTint="@color/md_grey_900" />
<com.google.android.material.button.MaterialButton
android:id="@+id/shuffleAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
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/shuffle"
android:textAllCaps="false"
android:textAppearance="@style/TextViewNormal"
app:cornerRadius="@dimen/button_corner"
app:icon="@drawable/ic_shuffle_white_24dp"
app:iconGravity="textStart"
app:layout_constraintBottom_toBottomOf="@+id/playAction"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/playAction"
app:layout_constraintTop_toTopOf="@+id/playAction" />
<com.google.android.material.button.MaterialButton
android:id="@+id/shuffleAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
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/shuffle"
android:textAllCaps="false"
android:textAppearance="@style/TextViewNormal"
app:cornerRadius="6dp"
app:icon="@drawable/ic_shuffle_white_24dp"
app:iconGravity="textStart"
app:layout_constraintBottom_toBottomOf="@+id/playAction"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/playAction"
app:layout_constraintTop_toTopOf="@+id/playAction"
tools:backgroundTint="@color/md_grey_900" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/biographyTitle"
style="@style/SubTitleTextAppearance"
android:text="@string/biography"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playAction"
tools:visibility="visible" />
<com.google.android.material.textview.MaterialTextView
@ -72,32 +66,48 @@
android:maxLines="4"
android:padding="16dp"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/biographyTitle"
tools:text="@string/bug_report_summary"
tools:visibility="visible" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/albumTitle"
style="@style/SubTitleTextAppearance"
android:text="@string/albums" />
android:text="@string/albums"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/biographyText" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/albumRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
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" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/songTitle"
style="@style/SubTitleTextAppearance"
android:text="@string/songs" />
android:text="@string/songs"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/albumRecyclerView" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
android:nestedScrollingEnabled="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/songTitle"
tools:listitem="@layout/item_song" />
<Space
android:layout_width="match_parent"
android:layout_height="72dp" />
</LinearLayout>
android:layout_height="72dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/recyclerView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,105 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="UnusedAttribute">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsingToolbarLayout"
<include layout="@layout/status_bar" />
</FrameLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:layout_collapseMode="parallax">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/artistImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_artist_image"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
<View
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/shadow_down_strong" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
app:liftOnScroll="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
app:cardElevation="8dp"
app:shapeAppearanceOverlay="@style/TopCornerCardView">
android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
<code.name.monkey.retromusic.views.WidthFitSquareCardView
android:id="@+id/albumCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
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">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/artistTitle"
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/artistImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Title" />
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
<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"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/activity_artist_content" />
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/artistTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:maxLines="2"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/albumCoverContainer"
tools:ignore="MissingPrefix"
tools:text="Title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:textAppearance="@style/TextViewSubtitle2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/artistTitle"
tools:ignore="MissingPrefix"
tools:text="Title" />
<include
layout="@layout/activity_artist_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -46,8 +46,6 @@
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_marginStart="@dimen/button_margin_horizontal"
android:layout_marginEnd="@dimen/button_margin_horizontal"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="none"

View file

@ -38,11 +38,11 @@
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout>
<com.google.android.material.card.MaterialCardView
<code.name.monkey.retromusic.views.WidthFitSquareCardView
android:id="@+id/imageContainer"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginStart="8dp"
android:layout_marginStart="16dp"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true"
app:layout_constraintStart_toStartOf="parent"
@ -50,10 +50,11 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/playerImage"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:src="@tools:sample/avatars" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
<LinearLayout
android:id="@+id/titleContainer"

View file

@ -32,7 +32,7 @@
android:text="@string/action_play_all"
android:textAllCaps="false"
android:textAppearance="@style/TextViewNormal"
app:cornerRadius="6dp"
app:cornerRadius="@dimen/button_corner"
app:icon="@drawable/ic_play_arrow_white_24dp"
app:iconGravity="textStart" />
@ -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" />

View file

@ -43,6 +43,7 @@
<dimen name="toolbar_margin_vertical">0dp</dimen>
<dimen name="item_song_height">52dp</dimen>
<dimen name="button_padding_vertical">10dp</dimen>
<dimen name="button_margin_horizontal">4dp</dimen>
<dimen name="button_margin_horizontal">16dp</dimen>
<dimen name="home_icon_padding">14dp</dimen>
<dimen name="button_corner">24dp</dimen>
</resources>