From 7e2a8d4782be539ae0a6b61f57fdf4dafc0a7fa9 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 19 Jul 2021 19:39:14 +0800 Subject: Fix RecyclerView's padding in TrendingActivity in immersive interface. --- .../infinityforreddit/activities/TrendingActivity.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java index db550a4f..1cea0c0e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java @@ -136,6 +136,11 @@ public class TrendingActivity extends BaseActivity { window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); } adjustToolbar(toolbar); + + int navBarResourceId = getResources().getIdentifier("navigation_bar_height", "dimen", "android"); + if (navBarResourceId > 0) { + recyclerView.setPadding(0, 0, 0, recyclerView.getPaddingBottom() + getResources().getDimensionPixelSize(navBarResourceId)); + } } } -- cgit v1.2.3