|
|
@@ -3,7 +3,6 @@
|
|
|
*/
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.main;
|
|
|
|
|
|
-import android.animation.Animator;
|
|
|
import android.animation.ObjectAnimator;
|
|
|
import android.content.Context;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
@@ -120,22 +119,12 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
weatherIcon.setTranslationY(100f);
|
|
|
ObjectAnimator weatherAnimator = ObjectAnimator.ofFloat(weatherIcon, "translationY", 0f);
|
|
|
weatherAnimator.setDuration(500);
|
|
|
- weatherAnimator.addListener(new AnimatorManager.SimpleListener() {
|
|
|
- @Override
|
|
|
- public void onAnimationCancel(Animator animation) {
|
|
|
- weatherIcon.setTranslationY(0f);
|
|
|
- }
|
|
|
- });
|
|
|
+ weatherAnimator.addListener(new AnimatorManager.SimpleListener());
|
|
|
|
|
|
weatherIcon.setAlpha(0f);
|
|
|
ObjectAnimator weatherAlphaAnimator = ObjectAnimator.ofFloat(weatherIcon, "alpha", 1f);
|
|
|
weatherAlphaAnimator.setDuration(800);
|
|
|
- weatherAlphaAnimator.addListener(new AnimatorManager.SimpleListener() {
|
|
|
- @Override
|
|
|
- public void onAnimationCancel(Animator animation) {
|
|
|
- weatherIcon.setAlpha(1f);
|
|
|
- }
|
|
|
- });
|
|
|
+ weatherAlphaAnimator.addListener(new AnimatorManager.SimpleListener());
|
|
|
|
|
|
AnimatorManager.getInstance().add(weatherAlphaAnimator);
|
|
|
AnimatorManager.getInstance().add(weatherAnimator);
|
|
|
@@ -144,23 +133,13 @@ public class MainContentsWeatherHolder extends MainContentsHolder /*implements V
|
|
|
ObjectAnimator textTopAnimator = ObjectAnimator.ofFloat(textTopView, "translationY", 0f);
|
|
|
textTopAnimator.setStartDelay(500);
|
|
|
textTopAnimator.setDuration(500);
|
|
|
- textTopAnimator.addListener(new AnimatorManager.SimpleListener() {
|
|
|
- @Override
|
|
|
- public void onAnimationCancel(Animator animation) {
|
|
|
- textTopView.setTranslationY(0f);
|
|
|
- }
|
|
|
- });
|
|
|
+ textTopAnimator.addListener(new AnimatorManager.SimpleListener());
|
|
|
|
|
|
layoutWeatherBottom.setTranslationY(100f);
|
|
|
ObjectAnimator textBottomAnimator = ObjectAnimator.ofFloat(layoutWeatherBottom, "translationY", 0f);
|
|
|
textBottomAnimator.setStartDelay(700);
|
|
|
textBottomAnimator.setDuration(500);
|
|
|
- textTopAnimator.addListener(new AnimatorManager.SimpleListener() {
|
|
|
- @Override
|
|
|
- public void onAnimationCancel(Animator animation) {
|
|
|
- layoutWeatherBottom.setTranslationY(0f);
|
|
|
- }
|
|
|
- });
|
|
|
+ textTopAnimator.addListener(new AnimatorManager.SimpleListener());
|
|
|
|
|
|
AnimatorManager.getInstance().add(textTopAnimator);
|
|
|
AnimatorManager.getInstance().add(textBottomAnimator);
|