Fix RecyclerView's padding in TrendingActivity in immersive interface.

This commit is contained in:
Alex Ning 2021-07-19 19:39:14 +08:00
parent 037223e286
commit 7e2a8d4782

View File

@ -136,6 +136,11 @@ public class TrendingActivity extends BaseActivity {
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
} }
adjustToolbar(toolbar); adjustToolbar(toolbar);
int navBarResourceId = getResources().getIdentifier("navigation_bar_height", "dimen", "android");
if (navBarResourceId > 0) {
recyclerView.setPadding(0, 0, 0, recyclerView.getPaddingBottom() + getResources().getDimensionPixelSize(navBarResourceId));
}
} }
} }