|
@@ -18,7 +18,6 @@ import java.util.List;
|
|
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
-import kr.co.zumo.app.lifeplus.util.AppUtil;
|
|
|
|
|
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
@@ -76,31 +75,12 @@ public class AllMenuFragment extends FragmentBase<AllMenuPresenter> implements I
|
|
|
findViewById(R.id.text_event).setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.EVENT).build()));
|
|
findViewById(R.id.text_event).setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.EVENT).build()));
|
|
|
findViewById(R.id.text_view_life_plus_guide).setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.GUIDE).build()));
|
|
findViewById(R.id.text_view_life_plus_guide).setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.GUIDE).build()));
|
|
|
|
|
|
|
|
- if (AppUtil.isDebug()) {
|
|
|
|
|
- findViewById(R.id.text_coupon).setVisibility(View.VISIBLE);
|
|
|
|
|
- findViewById(R.id.text_coupon).setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.COUPON_MALL).build()));
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- findViewById(R.id.text_coupon).setVisibility(View.GONE);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ findViewById(R.id.text_coupon).setVisibility(View.VISIBLE);
|
|
|
|
|
+ findViewById(R.id.text_coupon).setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.COUPON_MALL).build()));
|
|
|
|
|
|
|
|
setDefaultAnimationSetting();
|
|
setDefaultAnimationSetting();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
- public void setDefaultAnimationSetting() {
|
|
|
|
|
- for (int i = 0; i < categoryList.size(); ++i) {
|
|
|
|
|
- TextView categoryText = categoryList.get(i);
|
|
|
|
|
- categoryText.setTranslationX(ResourceUtil.dpToPx(90));
|
|
|
|
|
- categoryText.setAlpha(0f);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @Override
|
|
|
|
|
- public void hideMenuAnimation() {
|
|
|
|
|
- // TODO: 메뉴 들어갈때 애니메이션 구현
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected void defineActionBar(ActionBarHelper actionBarHelper) {
|
|
protected void defineActionBar(ActionBarHelper actionBarHelper) {
|
|
|
actionBarHelper.begin()
|
|
actionBarHelper.begin()
|
|
@@ -131,6 +111,11 @@ public class AllMenuFragment extends FragmentBase<AllMenuPresenter> implements I
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void hideMenuAnimation() {
|
|
|
|
|
+ // TODO: 메뉴 들어갈때 애니메이션 구현
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 알림이 1개 이상일 경우 진입시 애니메이션과 함께 뱃지 노출
|
|
* 알림이 1개 이상일 경우 진입시 애니메이션과 함께 뱃지 노출
|
|
|
*
|
|
*
|
|
@@ -142,6 +127,14 @@ public class AllMenuFragment extends FragmentBase<AllMenuPresenter> implements I
|
|
|
getHelper(ActionBarHelper.class).setNotiMarker(isNewNoti, isAnim);
|
|
getHelper(ActionBarHelper.class).setNotiMarker(isNewNoti, isAnim);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ void setDefaultAnimationSetting() {
|
|
|
|
|
+ for (int i = 0; i < categoryList.size(); ++i) {
|
|
|
|
|
+ TextView categoryText = categoryList.get(i);
|
|
|
|
|
+ categoryText.setTranslationX(ResourceUtil.dpToPx(120));
|
|
|
|
|
+ categoryText.setAlpha(0f);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
/**
|
|
/**
|
|
|
* 메뉴 애니메이션 추가
|
|
* 메뉴 애니메이션 추가
|
|
|
*/
|
|
*/
|
|
@@ -150,16 +143,19 @@ public class AllMenuFragment extends FragmentBase<AllMenuPresenter> implements I
|
|
|
|
|
|
|
|
AnimatorSet animatorSet = new AnimatorSet();
|
|
AnimatorSet animatorSet = new AnimatorSet();
|
|
|
|
|
|
|
|
|
|
+ final int duration = 400;
|
|
|
|
|
+ final int delay = 80;
|
|
|
|
|
+
|
|
|
for (int i = 0; i < categoryList.size(); ++i) {
|
|
for (int i = 0; i < categoryList.size(); ++i) {
|
|
|
TextView categoryText = categoryList.get(i);
|
|
TextView categoryText = categoryList.get(i);
|
|
|
ObjectAnimator translationX = ObjectAnimator.ofFloat(categoryText, View.TRANSLATION_X, categoryText.getTranslationX(), 0f);
|
|
ObjectAnimator translationX = ObjectAnimator.ofFloat(categoryText, View.TRANSLATION_X, categoryText.getTranslationX(), 0f);
|
|
|
ObjectAnimator alpha = ObjectAnimator.ofFloat(categoryText, View.ALPHA, 0.0f, 1f);
|
|
ObjectAnimator alpha = ObjectAnimator.ofFloat(categoryText, View.ALPHA, 0.0f, 1f);
|
|
|
|
|
|
|
|
- translationX.setDuration(700);
|
|
|
|
|
- translationX.setStartDelay(100 * i + 1);
|
|
|
|
|
|
|
+ translationX.setDuration(duration);
|
|
|
|
|
+ translationX.setStartDelay(delay * i);
|
|
|
|
|
|
|
|
- alpha.setDuration(700);
|
|
|
|
|
- alpha.setStartDelay(100 * i + 1);
|
|
|
|
|
|
|
+ alpha.setDuration(duration);
|
|
|
|
|
+ alpha.setStartDelay(delay * i);
|
|
|
|
|
|
|
|
animatorSet.playTogether(translationX, alpha);
|
|
animatorSet.playTogether(translationX, alpha);
|
|
|
}
|
|
}
|