diff --git a/lib/java/com/google/android/material/snackbar/BaseTransientBottomBar.java b/lib/java/com/google/android/material/snackbar/BaseTransientBottomBar.java index 9eb3f901d..5e1d5a11d 100644 --- a/lib/java/com/google/android/material/snackbar/BaseTransientBottomBar.java +++ b/lib/java/com/google/android/material/snackbar/BaseTransientBottomBar.java @@ -246,9 +246,12 @@ public abstract class BaseTransientBottomBar @NonNull private final ViewGroup targetParent; private final Context context; @NonNull protected final SnackbarBaseLayout view; - @NonNull private final com.google.android.material.snackbar.ContentViewCallback contentViewCallback; + + @NonNull + private final com.google.android.material.snackbar.ContentViewCallback contentViewCallback; + private int duration; - private boolean ignoreGestureInsetBottom; + private boolean gestureInsetBottomIgnored; @Nullable private View anchorView; @RequiresApi(VERSION_CODES.Q) @@ -418,7 +421,7 @@ public abstract class BaseTransientBottomBar } private boolean shouldUpdateGestureInset() { - return extraBottomMarginGestureInset > 0 && !ignoreGestureInsetBottom && isSwipeDismissable(); + return extraBottomMarginGestureInset > 0 && !gestureInsetBottomIgnored && isSwipeDismissable(); } private boolean isSwipeDismissable() { @@ -473,18 +476,18 @@ public abstract class BaseTransientBottomBar * *
Note: the bottom bar will only adjust it's position if it is dismissable via swipe (because * that would cause a gesture conflict), gesture navigation is enabled, and this {@code - * ignoreGestureInsetBottom} flag is false. + * gestureInsetBottomIgnored} flag is false. */ - public void setIgnoreGestureInsetBottom(boolean ignoreGestureInsetBottom) { - this.ignoreGestureInsetBottom = ignoreGestureInsetBottom; + public void setGestureInsetBottomIgnored(boolean gestureInsetBottomIgnored) { + this.gestureInsetBottomIgnored = gestureInsetBottomIgnored; } /** * Returns whether this bottom bar should adjust it's position based on the system gesture area on - * Android Q and above. See {@link #setIgnoreGestureInsetBottom(boolean)}. + * Android Q and above. See {@link #setGestureInsetBottomIgnored(boolean)}. */ - public boolean isIgnoreGestureInsetBottom() { - return ignoreGestureInsetBottom; + public boolean isGestureInsetBottomIgnored() { + return gestureInsetBottomIgnored; } /** Returns the {@link AnimationMode}. */