Change fab icon when in toplist mode

This commit is contained in:
NekoInverter committed 2020-10-26 17:06:00 +08:00
1 parent bc21f52ae2
commit ecb7045c6b
2 files changed
+2 -1

No files matched your search

@@ -494,6 +494,7 @@ public final class GalleryListScene extends BaseScene
if (isTopList != mIsTopList) {
mIsTopList = isTopList;
recreateDrawerView();
mFabLayout.getSecondaryFabAt(0).setImageResource(isTopList ? R.drawable.ic_baseline_format_list_numbered_24 : R.drawable.v_magnify_dark_x24);
}
// Update normal search mode
@@ -90,7 +90,7 @@ public class EhDrawerLayout extends DrawerLayout implements CoordinatorLayout.At
for (int i = 0, n = child.getAboveSnackViewCount(); i < n; i++) {
View view = child.getAboveSnackViewAt(i);
if (view != null) {
float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight() - LayoutUtils.dp2pix(view.getContext(), 4));
float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight() - LayoutUtils.dp2pix(view.getContext(), 8));
ViewCompat.animate(view).setInterpolator(new OvershootInterpolator()).translationY(translationY).start();
}
}