Merge "Only animate alignment of FAB if the FAB container is shown." into lmp-dev
diff --git a/src/com/android/contacts/common/widget/FloatingActionButtonController.java b/src/com/android/contacts/common/widget/FloatingActionButtonController.java
index e97cbfc..773e024 100644
--- a/src/com/android/contacts/common/widget/FloatingActionButtonController.java
+++ b/src/com/android/contacts/common/widget/FloatingActionButtonController.java
@@ -105,7 +105,9 @@
}
int translationX = getTranslationXForAlignment(align);
- if (animate) {
+
+ // Skip animation if container is not shown; animation causes container to show again.
+ if (animate && mFloatingActionButtonContainer.isShown()) {
mFloatingActionButtonContainer.animate()
.translationX(translationX + offsetX)
.translationY(offsetY)