From 1cdb0e9faca68f9682e004bc330ac8382ccf11d8 Mon Sep 17 00:00:00 2001 From: tehcneko <7764726+tehcneko@users.noreply.github.com> Date: Sat, 20 Mar 2021 11:04:34 +0800 Subject: [PATCH] Fix comment padding bottom --- .../com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java | 4 ---- app/src/main/res/layout/scene_gallery_comments.xml | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java index d68146733..b97a8e0e0 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java @@ -280,8 +280,6 @@ public final class GalleryCommentsScene extends ToolbarScene mRefreshLayout.setOnRefreshListener(this); Context context = requireContext(); - Resources resources = getResources(); - int paddingBottomFab = resources.getDimensionPixelOffset(R.dimen.gallery_padding_bottom_fab); Drawable drawable = ContextCompat.getDrawable(context, R.drawable.big_sad_pandroid); drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); @@ -300,8 +298,6 @@ public final class GalleryCommentsScene extends ToolbarScene decoration.setShowLastDivider(true); mRecyclerView.addItemDecoration(decoration); mRecyclerView.setHasFixedSize(true); - mRecyclerView.setPadding(mRecyclerView.getPaddingLeft(), mRecyclerView.getPaddingTop(), - mRecyclerView.getPaddingRight(), mRecyclerView.getPaddingBottom() + paddingBottomFab); // Cancel change animator RecyclerView.ItemAnimator itemAnimator = mRecyclerView.getItemAnimator(); if (itemAnimator instanceof DefaultItemAnimator) { diff --git a/app/src/main/res/layout/scene_gallery_comments.xml b/app/src/main/res/layout/scene_gallery_comments.xml index ad3a7e51c..d4d25a0f9 100644 --- a/app/src/main/res/layout/scene_gallery_comments.xml +++ b/app/src/main/res/layout/scene_gallery_comments.xml @@ -30,6 +30,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" + android:paddingBottom="@dimen/gallery_padding_bottom_fab" app:fitSystemWindowsInsets="bottom" />