Fix folder list last element hides under mini player
This commit is contained in:
parent
674c5de706
commit
328910c6cc
2 changed files with 20 additions and 31 deletions
|
@ -47,7 +47,6 @@ import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
import code.name.monkey.appthemehelper.common.ATHToolbarActivity;
|
import code.name.monkey.appthemehelper.common.ATHToolbarActivity;
|
||||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.adapter.SongFileAdapter;
|
import code.name.monkey.retromusic.adapter.SongFileAdapter;
|
||||||
|
@ -63,6 +62,7 @@ import code.name.monkey.retromusic.misc.DialogAsyncTask;
|
||||||
import code.name.monkey.retromusic.misc.UpdateToastMediaScannerCompletionListener;
|
import code.name.monkey.retromusic.misc.UpdateToastMediaScannerCompletionListener;
|
||||||
import code.name.monkey.retromusic.misc.WrappedAsyncTaskLoader;
|
import code.name.monkey.retromusic.misc.WrappedAsyncTaskLoader;
|
||||||
import code.name.monkey.retromusic.model.Song;
|
import code.name.monkey.retromusic.model.Song;
|
||||||
|
import code.name.monkey.retromusic.util.DensityUtil;
|
||||||
import code.name.monkey.retromusic.util.FileUtil;
|
import code.name.monkey.retromusic.util.FileUtil;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
|
@ -85,7 +85,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
private static final String CRUMBS = "crumbs";
|
private static final String CRUMBS = "crumbs";
|
||||||
private static final int LOADER_ID = LoaderIds.Companion.getFOLDERS_FRAGMENT();
|
private static final int LOADER_ID = LoaderIds.Companion.getFOLDERS_FRAGMENT();
|
||||||
|
|
||||||
private View coordinatorLayout, container, empty;
|
private View coordinatorLayout, empty;
|
||||||
|
|
||||||
private MaterialCardView toolbarContainer;
|
private MaterialCardView toolbarContainer;
|
||||||
|
|
||||||
|
@ -158,7 +158,6 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
breadCrumbs = view.findViewById(R.id.breadCrumbs);
|
breadCrumbs = view.findViewById(R.id.breadCrumbs);
|
||||||
toolbar = view.findViewById(R.id.toolbar);
|
toolbar = view.findViewById(R.id.toolbar);
|
||||||
empty = view.findViewById(android.R.id.empty);
|
empty = view.findViewById(android.R.id.empty);
|
||||||
container = view.findViewById(R.id.container);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setCrumb(BreadCrumbLayout.Crumb crumb, boolean addToHistory) {
|
private void setCrumb(BreadCrumbLayout.Crumb crumb, boolean addToHistory) {
|
||||||
|
@ -232,7 +231,6 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
private void setUpAppbarColor() {
|
private void setUpAppbarColor() {
|
||||||
int primaryColor = ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorPrimary);
|
int primaryColor = ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorPrimary);
|
||||||
getMainActivity().setSupportActionBar(toolbar);
|
getMainActivity().setSupportActionBar(toolbar);
|
||||||
TintHelper.setTintAuto(container, primaryColor, true);
|
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
toolbar.setBackgroundColor(RetroColorUtil.toolbarColor(getMainActivity()));
|
toolbar.setBackgroundColor(RetroColorUtil.toolbarColor(getMainActivity()));
|
||||||
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
||||||
|
@ -467,8 +465,9 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
|
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
|
||||||
container.setPadding(container.getPaddingLeft(), container.getPaddingTop(),
|
recyclerView.setPadding(recyclerView.getPaddingLeft(), recyclerView.getPaddingTop(),
|
||||||
container.getPaddingRight(), this.appBarLayout.getTotalScrollRange() + verticalOffset);
|
recyclerView.getPaddingRight(), DensityUtil.dip2px(requireContext(), 52f) +
|
||||||
|
this.appBarLayout.getTotalScrollRange() + verticalOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkIsEmpty() {
|
private void checkIsEmpty() {
|
||||||
|
|
|
@ -81,34 +81,24 @@
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
||||||
android:id="@+id/container"
|
android:id="@+id/recyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
android:clipToPadding="false"
|
||||||
|
android:layoutAnimation="@anim/layout_animation_fall_down"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
<FrameLayout
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:layout_width="match_parent"
|
android:id="@android:id/empty"
|
||||||
android:layout_height="wrap_content">
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:padding="24dp"
|
||||||
|
android:text="@string/empty"
|
||||||
|
android:textAppearance="@style/TextViewNormal"
|
||||||
|
android:textColor="?colorOnSecondary" />
|
||||||
|
|
||||||
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:layoutAnimation="@anim/layout_animation_fall_down"
|
|
||||||
android:scrollbars="none" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@android:id/empty"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:padding="24dp"
|
|
||||||
android:text="@string/empty"
|
|
||||||
android:textAppearance="@style/TextViewNormal"
|
|
||||||
android:textColor="?colorOnSecondary" />
|
|
||||||
</FrameLayout>
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Reference in a new issue