Fix layout issues for tablet

This commit is contained in:
h4h13 2019-06-24 01:44:27 +05:30
parent 2f6ca4b124
commit d132dafef5
17 changed files with 412 additions and 350 deletions

View file

@ -1,6 +1,7 @@
package code.name.monkey.retromusic.activities package code.name.monkey.retromusic.activities
import android.content.Intent import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.transition.Slide import android.transition.Slide
@ -70,7 +71,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
setupWindowTransition() setupWindowTransition()
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
toggleBottomNavigationView(true) toggleBottomNavigationView(true)
collapsingToolbarLayout?.setBackgroundColor(ThemeStore.primaryColor(this)) contentContainer?.setCardBackgroundColor( ColorStateList.valueOf(ThemeStore.primaryColor(this)))
setLightNavigationBar(true) setLightNavigationBar(true)
setNavigationbarColorAuto() setNavigationbarColorAuto()
@ -111,7 +112,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
supportActionBar!!.title = null supportActionBar!!.title = null
val primaryColor = ThemeStore.primaryColor(this) val primaryColor = ThemeStore.primaryColor(this)
TintHelper.setTintAuto(contentContainer!!, primaryColor, true) //TintHelper.setTintAuto(contentContainer!!, primaryColor, true)
if (collapsingToolbarLayout != null) { if (collapsingToolbarLayout != null) {
collapsingToolbarLayout!!.apply { collapsingToolbarLayout!!.apply {

View file

@ -2,6 +2,7 @@ package code.name.monkey.retromusic.activities
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Color import android.graphics.Color
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
@ -17,7 +18,10 @@ import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.* 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.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
import code.name.monkey.retromusic.adapter.album.AlbumAdapter import code.name.monkey.retromusic.adapter.album.AlbumAdapter
@ -68,7 +72,8 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
setDrawUnderStatusBar() setDrawUnderStatusBar()
setupWindowTransitions() setupWindowTransitions()
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
collapsingToolbarLayout?.setBackgroundColor(ThemeStore.primaryColor(this)) //collapsingToolbarLayout?.setBackgroundColor(ThemeStore.primaryColor(this))
contentContainer?.setCardBackgroundColor(ColorStateList.valueOf(ThemeStore.primaryColor(this)))
toggleBottomNavigationView(true) toggleBottomNavigationView(true)
setNavigationbarColorAuto() setNavigationbarColorAuto()
setLightNavigationBar(true) setLightNavigationBar(true)
@ -114,7 +119,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
private fun setupToolbarMarginHeight() { private fun setupToolbarMarginHeight() {
val primaryColor = ThemeStore.primaryColor(this) val primaryColor = ThemeStore.primaryColor(this)
TintHelper.setTintAuto(contentContainer!!, primaryColor, true)
collapsingToolbarLayout?.let { collapsingToolbarLayout?.let {
it.setContentScrimColor(primaryColor) it.setContentScrimColor(primaryColor)
it.setStatusBarScrimColor(ColorUtil.darkenColor(primaryColor)) it.setStatusBarScrimColor(ColorUtil.darkenColor(primaryColor))

View file

@ -17,6 +17,7 @@ import code.name.monkey.retromusic.Constants
import code.name.monkey.retromusic.Constants.USER_BANNER import code.name.monkey.retromusic.Constants.USER_BANNER
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.HomeAdapter import code.name.monkey.retromusic.adapter.HomeAdapter
import code.name.monkey.retromusic.extensions.hide
import code.name.monkey.retromusic.extensions.show import code.name.monkey.retromusic.extensions.show
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment
import code.name.monkey.retromusic.glide.GlideApp import code.name.monkey.retromusic.glide.GlideApp
@ -201,16 +202,17 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
private lateinit var homeAdapter: HomeAdapter private lateinit var homeAdapter: HomeAdapter
override fun showData(list: ArrayList<Home>) { override fun showData(list: ArrayList<Home>) {
if (list.isEmpty()){
showEmptyView()
return
}
val finalList = list.sortedWith(compareBy { it.priority }) val finalList = list.sortedWith(compareBy { it.priority })
homeAdapter.swapData(finalList) homeAdapter.swapData(finalList)
recyclerView.apply { recyclerView.apply {
layoutManager = LinearLayoutManager(mainActivity) layoutManager = LinearLayoutManager(mainActivity)
adapter = homeAdapter adapter = homeAdapter
} }
if (list.isEmpty()) {
showEmptyView()
} else {
emptyContainer.hide()
}
} }
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {

View file

@ -101,7 +101,6 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
setUpSubFragments() setUpSubFragments()
setUpPlayerToolbar() setUpPlayerToolbar()
snowfall.visibility = if (PreferenceUtil.getInstance().isSnowFall) View.VISIBLE else View.GONE
//val display = activity?.windowManager?.defaultDisplay //val display = activity?.windowManager?.defaultDisplay

View file

@ -30,70 +30,77 @@
</FrameLayout> </FrameLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
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:layout_weight="1"
android:fillViewport="true" android:fillViewport="true"
android:overScrollMode="never"> android:overScrollMode="never">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:orientation="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" />
<LinearLayout <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:gravity="center_vertical"
android:layout_weight="1" android:orientation="horizontal">
android:orientation="vertical"
android:padding="16dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/albumTitle" android:id="@+id/artistImage"
style="@style/TextAppearance.MaterialComponents.Headline6" android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="8dp"
android:layout_weight="0"
app:civ_border="false" />
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:layout_gravity="bottom"
tools:ignore="MissingPrefix" /> android:layout_weight="1"
android:orientation="vertical"
android:padding="16dp">
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/albumText" android:id="@+id/albumTitle"
style="@style/TextAppearance.MaterialComponents.Subtitle2" style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:maxLines="2"
android:ellipsize="marquee" tools:ignore="MissingPrefix" />
android:focusable="true"
android:focusableInTouchMode="true" <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:freezesText="true" android:id="@+id/albumText"
android:marqueeRepeatLimit="marquee_forever" style="@style/TextAppearance.MaterialComponents.Subtitle2"
android:scrollHorizontally="true" android:layout_width="match_parent"
android:singleLine="true" android:layout_height="wrap_content"
tools:ignore="MissingPrefix" android:layout_gravity="center"
tools:text="Title" /> android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<include layout="@layout/activity_album_content" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_album_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -30,64 +31,71 @@
</FrameLayout> </FrameLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
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:layout_weight="1"
android:overScrollMode="never"> android:overScrollMode="never">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<LinearLayout <LinearLayout
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:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
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:orientation="vertical" android:orientation="vertical">
android:padding="16dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <LinearLayout
android:id="@+id/artistTitle"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:orientation="vertical"
tools:ignore="MissingPrefix" android:padding="16dp">
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/text" android:id="@+id/artistTitle"
style="@style/TextAppearance.MaterialComponents.Subtitle2" style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:maxLines="2"
android:ellipsize="marquee" tools:ignore="MissingPrefix"
android:focusable="true" tools:text="Title" />
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/text"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
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:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/activity_artist_content" />
</LinearLayout> </LinearLayout>
<include layout="@layout/activity_artist_content" /> <View
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_padding" />
</LinearLayout> </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> </androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>

View file

@ -41,7 +41,6 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
@ -52,74 +51,81 @@
android:overScrollMode="never" android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="256dp"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<LinearLayout <LinearLayout
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="horizontal">
android:orientation="vertical"
android:padding="16dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/albumTitle" android:layout_width="256dp"
style="@style/TextAppearance.MaterialComponents.Headline3" android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:layout_weight="1"
tools:ignore="MissingPrefix" /> android:orientation="vertical"
android:padding="16dp">
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/albumText" android:id="@+id/albumTitle"
style="@style/TextAppearance.MaterialComponents.Headline6" style="@style/TextAppearance.MaterialComponents.Headline3"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:maxLines="2"
android:ellipsize="marquee" tools:ignore="MissingPrefix" />
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:id="@+id/albumText"
style="@style/TextAppearance.MaterialComponents.Headline6"
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:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<include layout="@layout/activity_album_content" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_album_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
<View <View

View file

@ -39,59 +39,65 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginStart="128dp" android:layout_marginStart="128dp"
android:layout_marginEnd="128dp" android:layout_marginEnd="128dp"
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
android:fillViewport="true" android:fillViewport="true"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:background="@color/md_red_500"> tools:background="@color/md_red_500">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical">
android:padding="24dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/artistTitle" <LinearLayout
style="@style/TextAppearance.MaterialComponents.Headline4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:orientation="vertical"
tools:ignore="MissingPrefix" android:padding="24dp">
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/text" android:id="@+id/artistTitle"
style="@style/TextAppearance.MaterialComponents.Headline6" style="@style/TextAppearance.MaterialComponents.Headline4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:maxLines="2"
android:ellipsize="marquee" tools:ignore="MissingPrefix"
android:focusable="true" tools:text="Title" />
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/text"
style="@style/TextAppearance.MaterialComponents.Headline6"
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:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/activity_artist_content" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_artist_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -30,7 +30,7 @@
<FrameLayout <FrameLayout
android:id="@+id/imageContainer" android:id="@+id/imageContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="228dp" android:layout_height="258dp"
app:layout_collapseMode="parallax"> app:layout_collapseMode="parallax">
<ImageView <ImageView
@ -63,6 +63,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="6dp" app:cardElevation="6dp"
android:layout_marginStart="128dp"
android:layout_marginEnd="128dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways"> app:layout_scrollFlags="scroll|enterAlways">

View file

@ -13,10 +13,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="24dp" android:padding="24dp">
android:paddingTop="10dp"
android:paddingEnd="24dp"
android:paddingBottom="10dp">
<code.name.monkey.retromusic.views.CircularImageView <code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/userImage" android:id="@+id/userImage"

View file

@ -42,86 +42,92 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginStart="96dp" android:layout_marginStart="96dp"
android:layout_marginEnd="96dp" android:layout_marginEnd="96dp"
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
android:fillViewport="true" android:fillViewport="true"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="horizontal"> android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="196dp"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<LinearLayout <LinearLayout
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:baselineAligned="false"
android:orientation="vertical" android:orientation="horizontal">
android:paddingStart="16dp"
android:paddingEnd="16dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/albumTitle" android:layout_width="196dp"
style="@style/TextAppearance.MaterialComponents.Headline4" android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:layout_weight="1"
tools:ignore="MissingPrefix" /> android:orientation="vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/albumText" android:id="@+id/albumTitle"
style="@style/TextAppearance.MaterialComponents.Headline6" style="@style/TextAppearance.MaterialComponents.Headline4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:maxLines="2"
android:ellipsize="marquee" tools:ignore="MissingPrefix" />
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:id="@+id/albumText"
style="@style/TextAppearance.MaterialComponents.Headline6"
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:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<include layout="@layout/activity_album_content" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_album_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
<View <View

View file

@ -40,61 +40,67 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginStart="96dp" android:layout_marginStart="96dp"
android:layout_marginEnd="96dp" android:layout_marginEnd="96dp"
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
android:fillViewport="true" android:fillViewport="true"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:elevation="@dimen/card_elevation" app:cardCornerRadius="16dp"
android:orientation="vertical" app:cardElevation="0dp">
tools:background="@color/md_red_500">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:elevation="@dimen/card_elevation"
android:orientation="vertical" android:orientation="vertical"
android:padding="12dp"> tools:background="@color/md_red_500">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/artistTitle" <LinearLayout
style="@style/TextAppearance.MaterialComponents.Headline4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:orientation="vertical"
tools:ignore="MissingPrefix" android:padding="12dp">
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/text" android:id="@+id/artistTitle"
style="@style/TextAppearance.MaterialComponents.Headline6" style="@style/TextAppearance.MaterialComponents.Headline4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:maxLines="2"
android:ellipsize="marquee" tools:ignore="MissingPrefix"
android:focusable="true" tools:text="Title" />
android:focusableInTouchMode="true"
android:freezesText="true" <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:marqueeRepeatLimit="marquee_forever" android:id="@+id/text"
android:scrollHorizontally="true" style="@style/TextAppearance.MaterialComponents.Headline6"
android:singleLine="true" android:layout_width="match_parent"
tools:ignore="MissingPrefix" android:layout_height="wrap_content"
tools:text="Title" /> android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/activity_artist_content" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_artist_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -30,7 +30,7 @@
<FrameLayout <FrameLayout
android:id="@+id/imageContainer" android:id="@+id/imageContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="196dp" android:layout_height="228dp"
app:layout_collapseMode="parallax"> app:layout_collapseMode="parallax">
<ImageView <ImageView
@ -61,6 +61,8 @@
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"
android:layout_marginStart="64dp"
android:layout_marginEnd="64dp"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="6dp" app:cardElevation="6dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
@ -70,8 +72,8 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:title="@string/search_hint" app:title="@string/search_hint"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:titleMarginStart="0dp" app:titleMarginStart="0dp"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>

View file

@ -32,10 +32,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"
android:layout_marginStart="64dp"
android:layout_marginEnd="64dp"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="0dp" app:cardElevation="0dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways" app:layout_scrollFlags="scroll|enterAlways"
app:strokeColor="?dividerColor" app:strokeColor="?dividerColor"

View file

@ -11,10 +11,7 @@
android:id="@+id/colorGradientBackground" android:id="@+id/colorGradientBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<com.jetradarmobile.snowfall.SnowfallView
android:id="@+id/snowfall"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<code.name.monkey.retromusic.views.FitSystemWindowsLayout <code.name.monkey.retromusic.views.FitSystemWindowsLayout
@ -29,6 +26,12 @@
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout <code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/album_cover_container" android:id="@+id/album_cover_container"
@ -65,7 +68,7 @@
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
</code.name.monkey.retromusic.views.FitSystemWindowsLayout> </code.name.monkey.retromusic.views.FitSystemWindowsLayout>

View file

@ -46,69 +46,75 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_circular_top_corners"
app:behavior_overlapTop="24dp" app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="vertical">
android:padding="12dp">
<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" />
<LinearLayout <LinearLayout
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="horizontal"
android:orientation="vertical" android:padding="12dp">
android:paddingStart="16dp"
android:paddingEnd="0dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/albumTitle" android:id="@+id/artistImage"
style="@style/TextAppearance.MaterialComponents.Headline6" android:layout_width="52dp"
android:layout_height="52dp"
android:layout_weight="0"
app:civ_border="false"
app:civ_shadow="false" />
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:layout_weight="1"
tools:ignore="MissingPrefix" /> android:orientation="vertical"
android:paddingStart="16dp"
android:paddingEnd="0dp">
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/albumText" android:id="@+id/albumTitle"
style="@style/TextAppearance.MaterialComponents.Subtitle2" style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:maxLines="2"
android:ellipsize="marquee" tools:ignore="MissingPrefix" />
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:id="@+id/albumText"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
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:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<include layout="@layout/activity_album_content" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_album_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -47,54 +47,60 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_circular_top_corners"
android:overScrollMode="never" android:overScrollMode="never"
app:behavior_overlapTop="24dp" app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> app:cardCornerRadius="16dp"
app:cardElevation="0dp">
<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">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <LinearLayout
android:id="@+id/artistTitle"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:orientation="vertical"
tools:ignore="MissingPrefix" android:padding="16dp">
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/artistTitle"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
tools:ignore="MissingPrefix"
tools:text="Title" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/text"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
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:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<include layout="@layout/activity_artist_content" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/text"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
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:scrollHorizontally="true"
android:singleLine="true"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/activity_artist_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>