Refactor from sliding uppanel to bottom sheet

main
h4h13 2019-10-04 18:29:37 +05:30
parent 6f362e1ab7
commit a4f7c99f61
14 changed files with 241 additions and 142 deletions

View File

@ -31,16 +31,20 @@ import code.name.monkey.retromusic.fragments.player.plain.PlainPlayerFragment
import code.name.monkey.retromusic.fragments.player.simple.SimplePlayerFragment
import code.name.monkey.retromusic.fragments.player.tiny.TinyPlayerFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.util.DensityUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.views.BottomNavigationBarTinted
import com.sothree.slidinguppanel.SlidingUpPanelLayout
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.card.MaterialCardView
import kotlinx.android.synthetic.main.sliding_music_panel_layout.*
abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), SlidingUpPanelLayout.PanelSlideListener, AbsPlayerFragment.Callbacks {
abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), AbsPlayerFragment.Callbacks {
companion object {
val TAG: String = AbsSlidingMusicPanelActivity::class.java.simpleName
}
private lateinit var bottomSheetBehavior: BottomSheetBehavior<MaterialCardView>
private var miniPlayerFragment: MiniPlayerFragment? = null
private var playerFragment: AbsPlayerFragment? = null
private var currentNowPlayingScreen: NowPlayingScreen? = null
@ -49,11 +53,37 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
private var lightStatusBar: Boolean = false
private var lightNavigationBar: Boolean = false
private var navigationBarColorAnimator: ValueAnimator? = null
protected abstract fun createContentView(): View
private val panelState: Int
get() = bottomSheetBehavior.state
private val bottomSheetCallbackList = object : BottomSheetBehavior.BottomSheetCallback() {
override fun onSlide(bottomSheet: View, slideOffset: Float) {
setMiniPlayerAlphaProgress(slideOffset)
}
override fun onStateChanged(bottomSheet: View, newState: Int) {
when (newState) {
BottomSheetBehavior.STATE_HIDDEN -> {
}
BottomSheetBehavior.STATE_EXPANDED -> {
onPanelExpanded()
}
BottomSheetBehavior.STATE_COLLAPSED -> {
onPanelCollapsed()
}
BottomSheetBehavior.STATE_DRAGGING -> {
}
BottomSheetBehavior.STATE_SETTLING -> {
}
else -> {
}
}
}
}
val panelState: SlidingUpPanelLayout.PanelState?
get() = slidingLayout.panelState
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -63,6 +93,10 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
setupSlidingUpPanel()
updateTabs()
bottomSheetBehavior = BottomSheetBehavior.from(slidingPanel)
bottomSheetBehavior.bottomSheetCallback = bottomSheetCallbackList
}
override fun onResume() {
@ -87,18 +121,19 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
}
fun setAntiDragView(antiDragView: View) {
slidingLayout.setAntiDragView(antiDragView)
//slidingLayout.setAntiDragView(antiDragView)
}
private fun collapsePanel() {
slidingLayout.panelState = SlidingUpPanelLayout.PanelState.COLLAPSED
bottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
}
fun expandPanel() {
slidingLayout.panelState = SlidingUpPanelLayout.PanelState.EXPANDED
bottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
}
private fun setMiniPlayerAlphaProgress(progress: Float) {
print("Sliding $progress")
if (miniPlayerFragment?.view == null) return
val alpha = 1 - progress
miniPlayerFragment?.view?.alpha = alpha
@ -117,44 +152,41 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
super.setLightNavigationBar(lightNavigationBar)
playerFragment!!.setMenuVisibility(false)
playerFragment!!.userVisibleHint = false
playerFragment!!.onHide()
playerFragment?.setMenuVisibility(false)
playerFragment?.userVisibleHint = false
playerFragment?.onHide()
}
open fun onPanelExpanded() {
val playerFragmentColor = playerFragment!!.paletteColor
super.setTaskDescriptionColor(playerFragmentColor)
playerFragment!!.setMenuVisibility(true)
playerFragment!!.userVisibleHint = true
playerFragment!!.onShow()
playerFragment?.setMenuVisibility(true)
playerFragment?.userVisibleHint = true
playerFragment?.onShow()
onPaletteColorChanged()
}
private fun setupSlidingUpPanel() {
slidingLayout.viewTreeObserver
slidingPanel.viewTreeObserver
.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
slidingLayout.viewTreeObserver.removeOnGlobalLayoutListener(this)
slidingPanel.viewTreeObserver.removeOnGlobalLayoutListener(this)
if (currentNowPlayingScreen != PEAK) {
val params = slidingPanel.layoutParams as ViewGroup.LayoutParams
params.height = ViewGroup.LayoutParams.MATCH_PARENT
slidingPanel.layoutParams = params
}
when (panelState) {
SlidingUpPanelLayout.PanelState.EXPANDED -> {
onPanelSlide(slidingLayout, 1f)
onPanelExpanded()
}
SlidingUpPanelLayout.PanelState.COLLAPSED -> onPanelCollapsed()
else -> playerFragment!!.onHide()
}
/* when (panelState) {
SlidingUpPanelLayout.PanelState.EXPANDED -> {
onPanelSlide(slidingLayout, 1f)
onPanelExpanded()
}
SlidingUpPanelLayout.PanelState.COLLAPSED -> onPanelCollapsed()
else -> playerFragment!!.onHide()
}*/
}
})
slidingLayout.addPanelSlideListener(this)
}
fun toggleBottomNavigationView(toggle: Boolean) {
@ -165,16 +197,20 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
return bottomNavigationView
}
fun hideBottomBar(hide: Boolean) {
private fun hideBottomBar(hide: Boolean) {
val heightOfBar = resources.getDimensionPixelSize(R.dimen.mini_player_height)
val heightOfBarWithTabs = resources.getDimensionPixelSize(R.dimen.mini_player_height_expanded)
if (hide) {
slidingLayout.panelHeight = 0
bottomSheetBehavior.isHideable = true
bottomSheetBehavior.peekHeight = 0
collapsePanel()
bottomNavigationView.elevation = DensityUtil.dip2px(this, 10f).toFloat()
} else {
if (MusicPlayerRemote.playingQueue.isNotEmpty()) {
slidingLayout.panelHeight = if (bottomNavigationView.visibility == View.VISIBLE) heightOfBarWithTabs else heightOfBar
bottomNavigationView.elevation = 0f
bottomSheetBehavior.isHideable = false
bottomSheetBehavior.peekHeight = if (bottomNavigationView.visibility == View.VISIBLE) heightOfBarWithTabs else heightOfBar
}
}
}
@ -215,10 +251,10 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
override fun onServiceConnected() {
super.onServiceConnected()
if (!MusicPlayerRemote.playingQueue.isEmpty()) {
slidingLayout.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
if (MusicPlayerRemote.playingQueue.isNotEmpty()) {
slidingPanel.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
slidingLayout.viewTreeObserver.removeOnGlobalLayoutListener(this)
slidingPanel.viewTreeObserver.removeOnGlobalLayoutListener(this)
hideBottomBar(false)
}
})
@ -236,20 +272,17 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
}
open fun handleBackPress(): Boolean {
if (slidingLayout.panelHeight != 0 && playerFragment!!.onBackPressed())
if (bottomSheetBehavior.peekHeight != 0 && playerFragment!!.onBackPressed())
return true
if (panelState == SlidingUpPanelLayout.PanelState.EXPANDED) {
if (panelState == BottomSheetBehavior.STATE_EXPANDED) {
collapsePanel()
return true
}
return false
}
override fun onPanelSlide(panel: View?, slideOffset: Float) {
setMiniPlayerAlphaProgress(slideOffset)
}
override fun onPanelStateChanged(panel: View, previousState: SlidingUpPanelLayout.PanelState, newState: SlidingUpPanelLayout.PanelState) {
/*override fun onPanelStateChanged(panel: View, previousState: SlidingUpPanelLayout.PanelState, newState: SlidingUpPanelLayout.PanelState) {
when (newState) {
SlidingUpPanelLayout.PanelState.COLLAPSED -> onPanelCollapsed()
SlidingUpPanelLayout.PanelState.EXPANDED -> onPanelExpanded()
@ -257,16 +290,15 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
else -> {
}
}
}
}*/
override fun onPaletteColorChanged() {
if (panelState == SlidingUpPanelLayout.PanelState.EXPANDED) {
if (panelState == BottomSheetBehavior.STATE_EXPANDED) {
val paletteColor = playerFragment!!.paletteColor
super.setTaskDescriptionColor(paletteColor)
val isColorLight = ColorUtil.isColorLight(paletteColor)
if (PreferenceUtil.getInstance(this).adaptiveColor &&
(currentNowPlayingScreen == NORMAL || currentNowPlayingScreen == FLAT)) {
super.setLightNavigationBar(true)
@ -289,21 +321,21 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
override fun setLightStatusbar(enabled: Boolean) {
lightStatusBar = enabled
if (panelState == SlidingUpPanelLayout.PanelState.COLLAPSED) {
if (panelState == BottomSheetBehavior.STATE_COLLAPSED) {
super.setLightStatusbar(enabled)
}
}
override fun setLightNavigationBar(enabled: Boolean) {
lightNavigationBar = enabled
if (panelState == SlidingUpPanelLayout.PanelState.COLLAPSED) {
if (panelState == BottomSheetBehavior.STATE_COLLAPSED) {
super.setLightNavigationBar(enabled)
}
}
override fun setNavigationbarColor(color: Int) {
navigationBarColor = color
if (panelState == SlidingUpPanelLayout.PanelState.COLLAPSED) {
if (panelState == BottomSheetBehavior.STATE_COLLAPSED) {
if (navigationBarColorAnimator != null) navigationBarColorAnimator!!.cancel()
super.setNavigationbarColor(color)
}
@ -311,7 +343,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
override fun setTaskDescriptionColor(color: Int) {
taskColor = color
if (panelState == SlidingUpPanelLayout.PanelState.COLLAPSED) {
if (panelState == BottomSheetBehavior.STATE_COLLAPSED) {
super.setTaskDescriptionColor(color)
}
}

View File

@ -1,6 +1,5 @@
package code.name.monkey.retromusic.adapter
import android.content.res.ColorStateList
import android.util.DisplayMetrics
import android.view.LayoutInflater
import android.view.View
@ -9,7 +8,6 @@ import androidx.annotation.IntDef
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.album.AlbumFullWidthAdapter
import code.name.monkey.retromusic.adapter.artist.ArtistAdapter
@ -20,7 +18,7 @@ import code.name.monkey.retromusic.model.Artist
import code.name.monkey.retromusic.model.Home
import code.name.monkey.retromusic.model.Playlist
import code.name.monkey.retromusic.util.PreferenceUtil
import com.google.android.material.chip.Chip
import com.google.android.material.textview.MaterialTextView
class HomeAdapter(
@ -92,8 +90,8 @@ class HomeAdapter(
recyclerView.apply {
adapter = AlbumFullWidthAdapter(activity, home.arrayList as ArrayList<Album>, displayMetrics)
}
chip.text = activity.getString(home.title)
chip.setChipIconResource(home.icon)
title.text = activity.getString(home.title)
text.text = activity.getString(home.subTitle)
}
}
@ -104,8 +102,9 @@ class HomeAdapter(
val artistAdapter = ArtistAdapter(activity, home.arrayList as ArrayList<Artist>, PreferenceUtil.getInstance(activity).getHomeGridStyle(context!!), false, null)
adapter = artistAdapter
}
chip.text = activity.getString(home.title)
chip.setChipIconResource(home.icon)
title.text = activity.getString(home.title)
text.text = activity.getString(home.subTitle)
}
}
@ -118,17 +117,14 @@ class HomeAdapter(
adapter = songAdapter
}
chip.text = activity.getString(home.title)
chip.setChipIconResource(home.icon)
title.text = activity.getString(home.title)
text.text = activity.getString(home.subTitle)
}
}
private open inner class AbsHomeViewItem(itemView: View) : RecyclerView.ViewHolder(itemView) {
val recyclerView: RecyclerView = itemView.findViewById(R.id.recyclerView)
val chip: Chip = itemView.findViewById(R.id.chipHead)
init {
chip.apply { chipBackgroundColor = ColorStateList.valueOf(ThemeStore.primaryColor(context)) }
}
val title: MaterialTextView = itemView.findViewById(R.id.title)
val text: MaterialTextView = itemView.findViewById(R.id.text)
}
}

View File

@ -9,7 +9,6 @@ import androidx.annotation.StringRes
import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.util.DensityUtil
import code.name.monkey.retromusic.util.ViewUtil
import com.google.android.material.appbar.AppBarLayout
@ -64,10 +63,7 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
}
private fun checkForPadding() {
val height = if (MusicPlayerRemote.playingQueue.isEmpty())
DensityUtil.dip2px(context!!, 52f)
else
0
val height = DensityUtil.dip2px(requireContext(), 52f)
recyclerView.setPadding(0, 0, 0, (height * 2.3).toInt())
}

View File

@ -151,11 +151,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
}
private fun checkPadding() {
val marginSpan = when {
MusicPlayerRemote.playingQueue.isEmpty() -> RetroUtil.convertDpToPixel(52f, context!!).toInt()
else -> RetroUtil.convertDpToPixel(0f, requireContext()).toInt()
}
val marginSpan = DensityUtil.dip2px(requireContext(), 52f)
(recyclerView.layoutParams as ViewGroup.MarginLayoutParams).bottomMargin = (marginSpan * 2.3f).toInt()
}

View File

@ -72,7 +72,7 @@ interface HomePresenter : Presenter<HomeView> {
if (it.isNotEmpty()) hashSet.add(
Home(0,
R.string.recent_artists,
0,
R.string.recent_added_artists,
it,
RECENT_ARTISTS,
R.drawable.ic_artist_white_24dp
@ -87,7 +87,7 @@ interface HomePresenter : Presenter<HomeView> {
if (it.isNotEmpty()) hashSet.add(
Home(1,
R.string.recent_albums,
0,
R.string.recent_added_albums,
it,
RECENT_ALBUMS,
R.drawable.ic_album_white_24dp
@ -102,7 +102,7 @@ interface HomePresenter : Presenter<HomeView> {
if (it.isNotEmpty()) hashSet.add(
Home(2,
R.string.top_artists,
0,
R.string.most_played_artists,
it,
TOP_ARTISTS,
R.drawable.ic_artist_white_24dp
@ -117,7 +117,7 @@ interface HomePresenter : Presenter<HomeView> {
if (it.isNotEmpty()) hashSet.add(
Home(3,
R.string.top_albums,
0,
R.string.most_played_albums,
it,
TOP_ALBUMS,
R.drawable.ic_album_white_24dp
@ -132,7 +132,7 @@ interface HomePresenter : Presenter<HomeView> {
if (it.isNotEmpty()) hashSet.add(
Home(4,
R.string.favorites,
0,
R.string.favorites_songs,
it,
PLAYLISTS,
R.drawable.ic_favorite_white_24dp

View File

@ -33,9 +33,10 @@
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"
android:background="?colorOnBackground"
android:background="?colorPrimary"
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView

View File

@ -34,9 +34,10 @@
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"
android:background="?colorOnBackground"
android:background="?colorPrimary"
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView

View File

@ -35,9 +35,10 @@
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"
android:background="?colorOnBackground"
android:background="?colorPrimary"
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView

View File

@ -2,7 +2,7 @@
<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="112dp"
android:layout_width="106dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:orientation="vertical">
@ -27,7 +27,6 @@
android:gravity="center"
android:maxLines="1"
android:paddingTop="12dp"
android:textAppearance="@style/TextViewNormal"
android:textColor="?colorOnPrimary"
tools:text="Name" />
</LinearLayout>

View File

@ -89,7 +89,6 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextViewBody2"
android:textColor="?colorOnBackground"
tools:text="Song artist name " />
</LinearLayout>

View File

@ -1,5 +1,5 @@
<?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"
@ -7,28 +7,61 @@
android:orientation="vertical"
android:paddingBottom="12dp">
<code.name.monkey.retromusic.views.RetroChip
android:id="@+id/chipHead"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/titleContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:layout_marginStart="@dimen/horizontal_padding_home"
android:layout_marginEnd="@dimen/horizontal_padding_home"
android:textAppearance="@style/ChipFont"
android:textColor="?android:textColorSecondary"
app:chipIconTint="?iconColor"
app:chipStrokeColor="?dividerColor"
app:chipStrokeWidth="1dp"
app:iconStartPadding="8dp"
tools:chipIcon="@drawable/ic_person_white_24dp"
tools:text="@string/for_you" />
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:text="@tools:sample/full_names" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewCaption"
tools:text="@tools:sample/full_names" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_keyboard_arrow_right_white_24dp"
app:tint="@color/ate_primary_text_light" />
</LinearLayout>
<code.name.monkey.retromusic.views.MetalRecyclerViewPager
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
app:itemMargin="28dp" />
</LinearLayout>
app:itemMargin="28dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,5 +1,5 @@
<?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:id="@+id/recentArtistContainer"
@ -7,28 +7,62 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<code.name.monkey.retromusic.views.RetroChip
android:id="@+id/chipHead"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/titleContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/horizontal_padding_home"
android:layout_marginTop="12dp"
android:layout_marginEnd="@dimen/horizontal_padding_home"
android:layout_marginBottom="12dp"
android:textAppearance="@style/ChipFont"
android:textColor="?android:textColorSecondary"
app:chipIconTint="?iconColor"
app:chipStrokeColor="?dividerColor"
app:chipStrokeWidth="1dp"
app:iconStartPadding="8dp"
tools:chipIcon="@drawable/ic_person_white_24dp"
tools:text="@string/for_you" />
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:text="@tools:sample/full_names" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewCaption"
tools:text="@tools:sample/full_names" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_keyboard_arrow_right_white_24dp"
app:tint="@color/ate_primary_text_light" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
android:layout_marginTop="16dp"
android:nestedScrollingEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto"
<!--<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/slidingLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -14,34 +14,40 @@
sothree:umanoOverlay="false"
sothree:umanoPanelHeight="0dp"
sothree:umanoScrollableView="@+id/recycler_view"
sothree:umanoShadowHeight="0dp">
sothree:umanoShadowHeight="0dp">-->
<FrameLayout
android:id="@+id/mainContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/slidingPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:behavior_hideable="false"
app:behavior_peekHeight="0dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<FrameLayout
android:id="@+id/mainContentFrame"
android:id="@+id/playerFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/slidingPanel"
<fragment
android:id="@+id/miniPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.MiniPlayerFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="48dp"
tools:layout="@layout/fragment_mini_player" />
<FrameLayout
android:id="@+id/playerFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<fragment
android:id="@+id/miniPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.MiniPlayerFragment"
android:layout_width="match_parent"
android:layout_height="48dp"
tools:layout="@layout/fragment_mini_player" />
</FrameLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</com.google.android.material.card.MaterialCardView>
<!-- </com.sothree.slidinguppanel.SlidingUpPanelLayout>-->
<code.name.monkey.retromusic.views.BottomNavigationBarTinted
android:id="@+id/bottomNavigationView"
@ -50,7 +56,7 @@
android:layout_gravity="bottom"
android:background="?colorSecondary"
android:elevation="0dp"
app:elevation="0dp"
android:visibility="gone"
app:itemIconTint="@drawable/bottom_navigation_item_colors"
app:itemTextAppearanceActive="@style/BottomSheetItemTextAppearanceActive"
app:itemTextAppearanceInactive="@style/BottomSheetItemTextAppearanceInactive"

View File

@ -659,4 +659,9 @@
<string name="action_toggle_favorite">Toggle favorite</string>
<string name="pref_dialog_corner_title">Dialog corner</string>
<string name="peak">Peak</string>
<string name="recent_added_artists">Recently added artists</string>
<string name="recent_added_albums">Recently added albums</string>
<string name="most_played_artists">Most played artists</string>
<string name="most_played_albums">Most played albums</string>
<string name="favorites_songs">You\'re most favorites songs</string>
</resources>