diff --git a/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/BottomSheetLayout.java b/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/BottomSheetLayout.java index 2fda620..b6973c3 100644 --- a/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/BottomSheetLayout.java +++ b/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/BottomSheetLayout.java @@ -289,11 +289,11 @@ public boolean isFabExpanded() { mFabExpandLayout.setVisibility(View.VISIBLE); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", 0f, dx)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, 0f, dx)); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", 0f, dy)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, 0f, dy)); fabSlideYAnim.setDuration(animationDuration / 2); Animator toolbarExpandAnim = @@ -356,11 +356,11 @@ private void expandPreLollipop() { mFabExpandLayout.setVisibility(View.VISIBLE); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", 0f, dx)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, 0f, dx)); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", 0f, dy)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, 0f, dy)); fabSlideYAnim.setDuration(animationDuration / 2); final SupportAnimator toolbarExpandAnim = @@ -435,12 +435,12 @@ private void expandPreLollipop() { Math.max(y, mFabExpandLayout.getHeight() - y)); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", dx, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, dx, 0f)); fabSlideXAnim.setStartDelay(animationDuration / 2); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", dy, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, dy, 0f)); fabSlideYAnim.setStartDelay(animationDuration / 2); fabSlideYAnim.setDuration(animationDuration / 2); @@ -498,11 +498,11 @@ private void contractPreLollipop() { Math.max(y, mFabExpandLayout.getHeight() - y)); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", dx, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, dx, 0f)); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", dy, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, dy, 0f)); fabSlideYAnim.setDuration(animationDuration / 2); final SupportAnimator toolbarContractAnim = diff --git a/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/FooterLayout.java b/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/FooterLayout.java index 04a9fbb..4ddbd8b 100644 --- a/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/FooterLayout.java +++ b/fabtransitionlayout/src/main/java/com/bowyer/app/fabtransitionlayout/FooterLayout.java @@ -276,11 +276,11 @@ public boolean isFabExpanded() { mFabExpandLayout.setVisibility(View.VISIBLE); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", 0f, dx)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, 0f, dx)); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", 0f, dy)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, 0f, dy)); fabSlideYAnim.setDuration(animationDuration / 2); Animator toolbarExpandAnim = @@ -343,11 +343,11 @@ private void expandPreLollipop() { mFabExpandLayout.setVisibility(View.VISIBLE); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", 0f, dx)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, 0f, dx)); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", 0f, dy)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, 0f, dy)); fabSlideYAnim.setDuration(animationDuration / 2); final SupportAnimator toolbarExpandAnim = @@ -422,12 +422,12 @@ private void expandPreLollipop() { Math.max(y, mFabExpandLayout.getHeight() - y)); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", dx, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, dx, 0f)); fabSlideXAnim.setStartDelay(animationDuration / 2); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", dy, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, dy, 0f)); fabSlideYAnim.setStartDelay(animationDuration / 2); fabSlideYAnim.setDuration(animationDuration / 2); @@ -487,11 +487,11 @@ private void contractPreLollipop() { Math.max(y, mFabExpandLayout.getHeight() - y)); Animator fabSlideXAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationX", dx, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_X, dx, 0f)); fabSlideXAnim.setDuration(animationDuration / 2); Animator fabSlideYAnim = ObjectAnimator.ofPropertyValuesHolder(mFab, - PropertyValuesHolder.ofFloat("translationY", dy, 0f)); + PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, dy, 0f)); fabSlideYAnim.setDuration(animationDuration / 2); final SupportAnimator toolbarContractAnim =