Fixed behavior

pull/168/head
M66B 5 years ago
parent a34698622a
commit 922da77a33

@ -46,6 +46,7 @@ public class BehaviorBottomMargin extends CoordinatorLayout.Behavior<View> {
public boolean onDependentViewChanged(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) { public boolean onDependentViewChanged(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) {
CoordinatorLayout.LayoutParams lparam = (CoordinatorLayout.LayoutParams) child.getLayoutParams(); CoordinatorLayout.LayoutParams lparam = (CoordinatorLayout.LayoutParams) child.getLayoutParams();
lparam.setMargins(0, 0, 0, dependency.getHeight()); lparam.setMargins(0, 0, 0, dependency.getHeight());
child.setLayoutParams(lparam);
return true; return true;
} }
@ -53,5 +54,6 @@ public class BehaviorBottomMargin extends CoordinatorLayout.Behavior<View> {
public void onDependentViewRemoved(CoordinatorLayout parent, View child, View dependency) { public void onDependentViewRemoved(CoordinatorLayout parent, View child, View dependency) {
CoordinatorLayout.LayoutParams lparam = (CoordinatorLayout.LayoutParams) child.getLayoutParams(); CoordinatorLayout.LayoutParams lparam = (CoordinatorLayout.LayoutParams) child.getLayoutParams();
lparam.setMargins(0, 0, 0, 0); lparam.setMargins(0, 0, 0, 0);
child.setLayoutParams(lparam);
} }
} }

Loading…
Cancel
Save