Skip to content

Commit

Permalink
Merge pull request #13 from bowyer-app/refactor/library
Browse files Browse the repository at this point in the history
remove hardcode
  • Loading branch information
bowyer-app authored Aug 4, 2016
2 parents bc73ee2 + e3fdf87 commit 70b838b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 70b838b

Please sign in to comment.