Move support libs to use ViewCompat.offset* methods

am: a5c36708f8

Change-Id: Ib0a9f28bb7de3453e1252d5a6cd41ef90500a13d

GitOrigin-RevId=1ea66d357aad81df357bd44375fed026435b3ebd

PiperOrigin-RevId: 140563761
This commit is contained in:
Chris Banes 2016-11-30 05:00:14 +00:00 committed by Travis Collins
parent 0f99f588ed
commit 49233d1821
2 changed files with 8 additions and 4 deletions

View File

@ -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) {

View File

@ -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);
}
}
}
}