From 885b3e3c60e39142e96bec5871ad80ecb5d03805 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Thu, 21 Sep 2023 11:45:27 -0300 Subject: [PATCH] refactor(ScheduledStatusListFragment): refactor the apply window insets method This allows for a smoother experience in my views --- .../android/fragments/ScheduledStatusListFragment.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ScheduledStatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ScheduledStatusListFragment.java index 39748bcfe4..9705497df2 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ScheduledStatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ScheduledStatusListFragment.java @@ -195,10 +195,7 @@ protected ScheduledStatus getStatusByID(String id){ public void onApplyWindowInsets(WindowInsets insets){ if(contentView!=null){ if(Build.VERSION.SDK_INT>=29 && insets.getTappableElementInsets().bottom==0){ - int insetBottom=insets.getSystemWindowInsetBottom(); - ((ViewGroup.MarginLayoutParams) list.getLayoutParams()).bottomMargin=insetBottom; - ((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16)+insetBottom; - insets=insets.inset(0, 0, 0, insetBottom); + ((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16)+insets.getSystemWindowInsetBottom(); }else{ ((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16); }