mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
Move support libs to use ViewCompat.offset* methods
am: a5c36708f8 Change-Id: Ib0a9f28bb7de3453e1252d5a6cd41ef90500a13d GitOrigin-RevId=1ea66d357aad81df357bd44375fed026435b3ebd PiperOrigin-RevId: 140563761
This commit is contained in:
parent
0f99f588ed
commit
49233d1821
@ -1495,10 +1495,10 @@ public class CoordinatorLayout extends ViewGroup implements NestedScrollingParen
|
||||
final int dy = desiredChildRect.top - childRect.top;
|
||||
|
||||
if (dx != 0) {
|
||||
child.offsetLeftAndRight(dx);
|
||||
ViewCompat.offsetLeftAndRight(child, dx);
|
||||
}
|
||||
if (dy != 0) {
|
||||
child.offsetTopAndBottom(dy);
|
||||
ViewCompat.offsetTopAndBottom(child, dy);
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
|
||||
@ -788,8 +788,12 @@ public class FloatingActionButton extends VisibilityAwareImageButton {
|
||||
offsetTB = -padding.top;
|
||||
}
|
||||
|
||||
fab.offsetTopAndBottom(offsetTB);
|
||||
fab.offsetLeftAndRight(offsetLR);
|
||||
if (offsetTB != 0) {
|
||||
ViewCompat.offsetTopAndBottom(fab, offsetTB);
|
||||
}
|
||||
if (offsetLR != 0) {
|
||||
ViewCompat.offsetLeftAndRight(fab, offsetLR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user