Revert "Scroll helper"

This commit is contained in:
Hemanth S 2020-04-19 02:19:30 +05:30 committed by GitHub
parent f2be4720ad
commit 5de5fc1c3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 194 additions and 217 deletions

View file

@ -184,8 +184,6 @@ dependencies {
implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3'
implementation 'com.github.ologe:scroll-helper:2.0.0-beta01'
implementation 'com.anjlab.android.iab.v3:library:1.1.0'
implementation 'com.r0adkll:slidableactivity:2.1.0'
implementation 'com.heinrichreimersoftware:material-intro:1.6'

View file

@ -1,67 +0,0 @@
package code.name.monkey.retromusic
import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager2.widget.ViewPager2
import code.name.monkey.retromusic.fragments.player.normal.PlayerFragment
import dev.olog.scrollhelper.ScrollHelper
class RetroScrollHelper(
private val activity: FragmentActivity
) : ScrollHelper(activity,
true,
false // TODO when true, scrolls both bottomsheet and bottom navigation
) {
private val skipFragment = listOf(
PlayerFragment::class.java.name
)
// TODO every fragment has to have it's unique tag in order to work correctly
// here you can decide what fragment will be processed by the library
// probably you want to skip player fragments, ecc ..
override fun shouldSkipFragment(fragment: Fragment): Boolean {
return fragment::class.java.name in skipFragment
}
override fun findBottomNavigation(): View? {
return activity.findViewById(R.id.bottomNavigationView)
}
override fun findBottomSheet(): View? {
return activity.findViewById(R.id.slidingPanel)
}
override fun findFab(fragment: Fragment): View? {
return null
}
override fun findRecyclerView(fragment: Fragment): RecyclerView? {
return fragment.requireView().findViewById(R.id.recyclerView)
}
override fun findToolbar(fragment: Fragment): View? {
return fragment.requireActivity().findViewById(R.id.toolbarContainer)
}
override fun findTabLayout(fragment: Fragment): View? {
return null
}
override fun findViewPager(fragment: Fragment): ViewPager2? {
return null
}
// TODO override this if you want to apply custom padding
override fun updateRecyclerViewPadding(
fragment: Fragment,
recyclerView: RecyclerView,
topPadding: Int,
bottomPadding: Int
) {
super.updateRecyclerViewPadding(fragment, recyclerView, topPadding, bottomPadding)
}
}

View file

@ -55,7 +55,6 @@ import java.util.List;
import code.name.monkey.appthemehelper.util.ATHUtil;
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.RetroScrollHelper;
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity;
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog;
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
@ -84,7 +83,6 @@ import code.name.monkey.retromusic.util.NavigationUtil;
import code.name.monkey.retromusic.util.PreferenceUtil;
import code.name.monkey.retromusic.util.RetroColorUtil;
import code.name.monkey.retromusic.util.RetroUtil;
import dev.olog.scrollhelper.ScrollHelper;
/**
* Created by hemanths on 2020-02-19.
@ -121,9 +119,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
private Toolbar mToolbar;
private MaterialCardView mToolbarContainer;
@SuppressWarnings("FieldCanBeLocal")
private ScrollHelper scrollHelper;
@Override
protected void onCreate(@Nullable final Bundle savedInstanceState) {
setDrawUnderStatusBar();
@ -156,8 +151,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
checkShowChangelog();
AppRater.appLaunched(this);
setupToolbar();
scrollHelper = new RetroScrollHelper(this);
}
@Override

View file

@ -111,14 +111,10 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
}
}
override fun onPause() {
super.onPause()
bottomSheetBehavior.removeBottomSheetCallback(bottomSheetCallbackList)
}
override fun onDestroy() {
super.onDestroy()
navigationBarColorAnimator?.cancel() // just in case
bottomSheetBehavior.removeBottomSheetCallback(bottomSheetCallbackList)
if (navigationBarColorAnimator != null) navigationBarColorAnimator?.cancel() // just in case
}
protected fun wrapSlidingMusicPanel(@LayoutRes resId: Int): View {
@ -146,6 +142,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
// necessary to make the views below clickable
miniPlayerFragment?.view?.visibility = if (alpha == 0f) View.GONE else View.VISIBLE
bottomNavigationView.translationY = progress * 500
//bottomNavigationView.alpha = alpha
}
@ -220,8 +217,8 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
}
}
fun setBottomBarVisibility(visibility: Int) {
bottomNavigationView.visibility = visibility
fun setBottomBarVisibility(gone: Int) {
bottomNavigationView.visibility = gone
hideBottomBar(false)
}

View file

@ -1,10 +0,0 @@
package code.name.monkey.retromusic.extensions
import android.content.Context
import androidx.annotation.DimenRes
@Suppress("NOTHING_TO_INLINE")
inline fun Context.dip(value: Int): Int = (value * resources.displayMetrics.density).toInt()
@Suppress("NOTHING_TO_INLINE")
inline fun Context.dimen(@DimenRes resource: Int): Int = resources.getDimensionPixelSize(resource)

View file

@ -8,13 +8,17 @@ import androidx.annotation.NonNull
import androidx.annotation.StringRes
import androidx.recyclerview.widget.RecyclerView
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.ThemedFastScroller.create
import code.name.monkey.retromusic.views.ScrollingViewOnApplyWindowInsetsListener
import com.google.android.material.appbar.AppBarLayout
import kotlinx.android.synthetic.main.fragment_main_activity_recycler_view.*
import me.zhanghai.android.fastscroll.FastScroller
import me.zhanghai.android.fastscroll.FastScrollerBuilder
abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : RecyclerView.LayoutManager> :
AbsLibraryPagerFragment() {
AbsLibraryPagerFragment(), AppBarLayout.OnOffsetChangedListener {
protected var adapter: A? = null
protected var layoutManager: LM? = null
@ -27,6 +31,7 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
mainActivity.addOnAppBarOffsetChangedListener(this)
initLayoutManager()
initAdapter()
setUpRecyclerView()
@ -36,6 +41,13 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
recyclerView.layoutManager = layoutManager
recyclerView.adapter = adapter
val fastScroller = create(recyclerView)
recyclerView.setOnApplyWindowInsetsListener(
ScrollingViewOnApplyWindowInsetsListener(
recyclerView,
fastScroller
)
)
checkForPadding()
}
protected open fun createFastScroller(recyclerView: RecyclerView): FastScroller {
@ -48,6 +60,7 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
override fun onChanged() {
super.onChanged()
checkIsEmpty()
checkForPadding()
}
})
}
@ -65,6 +78,18 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
empty.visibility = if (adapter!!.itemCount == 0) View.VISIBLE else View.GONE
}
private fun checkForPadding() {
val itemCount: Int = adapter?.itemCount ?: 0
val params = container.layoutParams as ViewGroup.MarginLayoutParams
if (itemCount > 0 && MusicPlayerRemote.playingQueue.isNotEmpty()) {
val height = DensityUtil.dip2px(requireContext(), 104f)
params.bottomMargin = height
} else {
val height = DensityUtil.dip2px(requireContext(), 52f)
params.bottomMargin = height
}
}
private fun initLayoutManager() {
layoutManager = createLayoutManager()
}
@ -74,6 +99,25 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
@NonNull
protected abstract fun createAdapter(): A
override fun onOffsetChanged(p0: AppBarLayout?, i: Int) {
container.setPadding(
container.paddingLeft,
container.paddingTop,
container.paddingRight,
mainActivity.totalAppBarScrollingRange + i
)
}
override fun onQueueChanged() {
super.onQueueChanged()
checkForPadding()
}
override fun onServiceConnected() {
super.onServiceConnected()
checkForPadding()
}
protected fun invalidateLayoutManager() {
initLayoutManager()
recyclerView.layoutManager = layoutManager
@ -85,6 +129,11 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
recyclerView.adapter = adapter
}
override fun onDestroyView() {
super.onDestroyView()
mainActivity.removeOnAppBarOffsetChangedListener(this)
}
fun recyclerView(): RecyclerView {
return recyclerView
}

View file

@ -12,7 +12,6 @@ import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.mvp.presenter.AlbumsPresenter
import code.name.monkey.retromusic.mvp.presenter.AlbumsView
import code.name.monkey.retromusic.util.PreferenceUtil
import dev.olog.scrollhelper.layoutmanagers.OverScrollGridLayoutManager
import javax.inject.Inject
class AlbumsFragment :
@ -52,7 +51,7 @@ class AlbumsFragment :
get() = R.string.no_albums
override fun createLayoutManager(): GridLayoutManager {
return OverScrollGridLayoutManager(requireActivity(), getGridSize())
return GridLayoutManager(requireActivity(), getGridSize())
}
override fun createAdapter(): AlbumAdapter {

View file

@ -12,7 +12,6 @@ import code.name.monkey.retromusic.model.Artist
import code.name.monkey.retromusic.mvp.presenter.ArtistsPresenter
import code.name.monkey.retromusic.mvp.presenter.ArtistsView
import code.name.monkey.retromusic.util.PreferenceUtil
import dev.olog.scrollhelper.layoutmanagers.OverScrollGridLayoutManager
import javax.inject.Inject
class ArtistsFragment :
@ -64,7 +63,7 @@ class ArtistsFragment :
}
override fun createLayoutManager(): GridLayoutManager {
return OverScrollGridLayoutManager(requireActivity(), getGridSize())
return GridLayoutManager(requireActivity(), getGridSize())
}
override fun createAdapter(): ArtistAdapter {

View file

@ -42,7 +42,6 @@ import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import dev.olog.scrollhelper.layoutmanagers.OverScrollLinearLayoutManager
import kotlinx.android.synthetic.main.abs_playlists.*
import kotlinx.android.synthetic.main.fragment_banner_home.*
import kotlinx.android.synthetic.main.home_content.*
@ -148,7 +147,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
homeAdapter = HomeAdapter(mainActivity, displayMetrics)
recyclerView.apply {
layoutManager = OverScrollLinearLayoutManager(mainActivity)
layoutManager = LinearLayoutManager(mainActivity)
adapter = homeAdapter
}
homePresenter.attachView(this)

View file

@ -74,7 +74,6 @@ import code.name.monkey.retromusic.util.RetroColorUtil;
import code.name.monkey.retromusic.util.ThemedFastScroller;
import code.name.monkey.retromusic.views.BreadCrumbLayout;
import code.name.monkey.retromusic.views.ScrollingViewOnApplyWindowInsetsListener;
import dev.olog.scrollhelper.layoutmanagers.OverScrollLinearLayoutManager;
import me.zhanghai.android.fastscroll.FastScroller;
public class FoldersFragment extends AbsMainActivityFragment implements
@ -479,7 +478,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
}
private void setUpRecyclerView() {
recyclerView.setLayoutManager(new OverScrollLinearLayoutManager(getActivity()));
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
FastScroller fastScroller = ThemedFastScroller.INSTANCE.create(recyclerView);
recyclerView.setOnApplyWindowInsetsListener(
new ScrollingViewOnApplyWindowInsetsListener(recyclerView, fastScroller));

View file

@ -25,7 +25,6 @@ import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import code.name.monkey.retromusic.model.Genre
import code.name.monkey.retromusic.mvp.presenter.GenresPresenter
import code.name.monkey.retromusic.mvp.presenter.GenresView
import dev.olog.scrollhelper.layoutmanagers.OverScrollLinearLayoutManager
import javax.inject.Inject
class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearLayoutManager>(),
@ -43,7 +42,7 @@ class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearL
}
override fun createLayoutManager(): LinearLayoutManager {
return OverScrollLinearLayoutManager(activity)
return LinearLayoutManager(activity)
}
override fun createAdapter(): GenreAdapter {

View file

@ -28,7 +28,6 @@ import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropM
import com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeManager
import com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
import dev.olog.scrollhelper.layoutmanagers.OverScrollLinearLayoutManager
import kotlinx.android.synthetic.main.activity_playing_queue.*
/**
@ -74,7 +73,7 @@ class PlayingQueueFragment :
}
override fun createLayoutManager(): LinearLayoutManager {
return OverScrollLinearLayoutManager(requireContext())
return LinearLayoutManager(requireContext())
}
override fun createAdapter(): PlayingQueueAdapter {

View file

@ -13,7 +13,6 @@ import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks
import code.name.monkey.retromusic.model.Playlist
import code.name.monkey.retromusic.mvp.presenter.PlaylistView
import code.name.monkey.retromusic.mvp.presenter.PlaylistsPresenter
import dev.olog.scrollhelper.layoutmanagers.OverScrollGridLayoutManager
import javax.inject.Inject
class PlaylistsFragment :
@ -41,7 +40,7 @@ class PlaylistsFragment :
}
override fun createLayoutManager(): GridLayoutManager {
return OverScrollGridLayoutManager(requireContext(), 1)
return GridLayoutManager(requireContext(), 1)
}
override fun createAdapter(): PlaylistAdapter {

View file

@ -14,7 +14,6 @@ import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.mvp.presenter.SongPresenter
import code.name.monkey.retromusic.mvp.presenter.SongView
import code.name.monkey.retromusic.util.PreferenceUtil
import dev.olog.scrollhelper.layoutmanagers.OverScrollGridLayoutManager
import java.util.*
import javax.inject.Inject
@ -40,7 +39,7 @@ class SongsFragment :
}
override fun createLayoutManager(): GridLayoutManager {
return OverScrollGridLayoutManager(requireActivity(), getGridSize()).apply {
return GridLayoutManager(requireActivity(), getGridSize()).apply {
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
return if (position == 0) {

View file

@ -18,13 +18,11 @@ import code.name.monkey.appthemehelper.ThemeStore.Companion.accentColor
import code.name.monkey.appthemehelper.util.ColorUtil.isColorLight
import code.name.monkey.appthemehelper.util.MaterialValueHelper.getPrimaryTextColor
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.dimen
import code.name.monkey.retromusic.extensions.dip
import code.name.monkey.retromusic.views.PopupBackground
import me.zhanghai.android.fastscroll.FastScroller
import me.zhanghai.android.fastscroll.FastScrollerBuilder
import me.zhanghai.android.fastscroll.PopupStyles
import me.zhanghai.android.fastscroll.R
object ThemedFastScroller {
fun create(view: ViewGroup): FastScroller {
@ -39,13 +37,6 @@ object ThemedFastScroller {
popupText.setTextColor(textColor)
}
fastScrollerBuilder.setPadding(
0,
view.context.dimen(R.dimen.toolbar_height) + view.context.dip(8),
0,
view.context.dimen(R.dimen.mini_player_height)
)
fastScrollerBuilder.setThumbDrawable(
TintHelper.createTintedDrawable(
context,

View file

@ -0,0 +1,59 @@
/*
* Copyright (c) 2019 Hemanth Savarala.
*
* Licensed under the GNU General Public License v3
*
* This is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*/
package code.name.monkey.retromusic.views;
import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.view.View;
import androidx.annotation.NonNull;
public class StatusBarView extends View {
public StatusBarView(@NonNull Context context) {
super(context);
init(context);
}
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs) {
super(context, attrs);
init(context);
}
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
public static int getStatusBarHeight(@NonNull Resources r) {
int result = 0;
int resourceId = r.getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = r.getDimensionPixelSize(resourceId);
}
return result;
}
private void init(Context context) {
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), getStatusBarHeight(getResources()));
}
}

View file

@ -1,30 +0,0 @@
package code.name.monkey.retromusic.views
import android.content.Context
import android.util.AttributeSet
import android.view.View
class StatusBarView(
context: Context,
attrs: AttributeSet
) : View(context, attrs) {
override fun onAttachedToWindow() {
super.onAttachedToWindow()
if (isInEditMode){
return
}
setOnApplyWindowInsetsListener { _, insets ->
val height = insets?.systemWindowInsetTop ?: 0
setHeight(height)
insets
}
}
private fun setHeight(px: Int) {
val params = layoutParams ?: return
params.height = px
layoutParams = params
}
}

View file

@ -1,71 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:background="?colorSurface">
<!-- TODO in order to work, children has to be defined in reverse drawing order-->
<!-- TODO so: first fragment_container, than toolbar, than statusbar -->
android:background="?colorSurface"
android:orientation="vertical">
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/status_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
app:layout_constraintTop_toBottomOf="@+id/status_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways">
android:elevation="0dp"
tools:ignore="UnusedAttribute">
<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"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp"
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:background="?attr/colorSurface"
app:popupTheme="?attr/toolbarPopupTheme"
app:titleTextColor="?attr/colorControlNormal"
app:titleTextAppearance="@style/TextViewHeadline6"
tools:ignore="UnusedAttribute">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/appTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/app_name"
android:textColor="?attr/colorControlNormal"
android:textAppearance="@style/TextViewHeadline6" />
</androidx.appcompat.widget.Toolbar>
<ViewStub
android:id="@+id/cab_stub"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height" />
</FrameLayout>
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:background="?attr/colorSurface"
app:popupTheme="?attr/toolbarPopupTheme"
app:titleTextColor="?attr/colorControlNormal"
app:titleTextAppearance="@style/TextViewHeadline6"
tools:ignore="UnusedAttribute">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/appTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/app_name"
android:textColor="?attr/colorControlNormal"
android:textAppearance="@style/TextViewHeadline6" />
</androidx.appcompat.widget.Toolbar>
<ViewStub
android:id="@+id/cab_stub"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height" />
</FrameLayout>
</com.google.android.material.card.MaterialCardView>
<include layout="@layout/status_bar"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="0dp"
tools:layout_height="24dp"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_height="match_parent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -17,7 +17,6 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/toolbar_height"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -17,7 +17,6 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/toolbar_height"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -6,16 +6,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- TODO note that recycler view has to cover the entire screen -->
<!-- TODO so has to be drawn under bottom navigation, toolbar, ecc, but has to be below statusbar-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:layoutAnimation="@anim/layout_animation_fall_down"
android:overScrollMode="never"
android:scrollbars="none"
app:layout_dodgeInsetEdges="bottom"
tools:listitem="@layout/item_list" />
<LinearLayout

View file

@ -37,7 +37,7 @@
android:id="@+id/miniPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.MiniPlayerFragment"
android:layout_width="match_parent"
android:layout_height="@dimen/mini_player_height"
android:layout_height="48dp"
tools:layout="@layout/fragment_mini_player" />
</FrameLayout>