This commit is contained in:
Alexander Sytnyk 2018-01-23 17:52:26 +02:00
parent 88a6154915
commit c29186a6a0

View file

@ -1238,7 +1238,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
animators.add(ObjectAnimator.ofFloat(content, View.TRANSLATION_X, initialValueX, finalValueX));
animators.add(ObjectAnimator.ofFloat(content, View.TRANSLATION_Y, initialValueY, finalValueY));
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && ViewCompat.isAttachedToWindow(content)) {
int centerX = content.getMeasuredWidth() / 2;
int centerY = content.getMeasuredHeight() / 2;
float initialRadius = show ? 0 : (float) Math.sqrt(Math.pow(content.getWidth() / 2, 2) + Math.pow(content.getHeight() / 2, 2));