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 864dec49e..00d4e5112 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ScheduledStatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ScheduledStatusListFragment.java @@ -2,8 +2,11 @@ package org.joinmastodon.android.fragments; import android.app.Activity; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.view.View; +import android.view.ViewGroup; +import android.view.WindowInsets; import android.widget.ImageButton; import com.squareup.otto.Subscribe; @@ -26,6 +29,7 @@ import java.util.List; import me.grishka.appkit.Nav; import me.grishka.appkit.api.SimpleCallback; +import me.grishka.appkit.utils.V; public class ScheduledStatusListFragment extends BaseStatusListFragment { private String nextMaxID; @@ -186,6 +190,21 @@ public class ScheduledStatusListFragment extends BaseStatusListFragment=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); + }else{ + ((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16); + } + } + super.onApplyWindowInsets(insets); + } + @Override public Uri getWebUri(Uri.Builder base) { // TODO: adapt when frontends finally implement a scheduled posts list