Fixed bottom behaviors

This commit is contained in:
M66B 2020-07-04 23:02:45 +02:00
parent ff5ec9eb1f
commit 8d3c057fea
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ public class BehaviorBottomMargin extends CoordinatorLayout.Behavior<View> {
@Override
public boolean onDependentViewChanged(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) {
setMargin(child, dependency.getHeight());
setMargin(child, dependency.isAttachedToWindow() ? dependency.getHeight() : 0);
return true;
}

View File

@ -44,7 +44,7 @@ public class BehaviorBottomPadding extends CoordinatorLayout.Behavior<View> {
@Override
public boolean onDependentViewChanged(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) {
setPadding(child, dependency.getHeight());
setPadding(child, dependency.isAttachedToWindow() ? dependency.getHeight() : 0);
return true;
}