浏览代码

[LP소개][Common] LP소개 애니메이션 구현 및 버킷리스트 액티비티 전환으로변경

Hasemi 7 年之前
父节点
当前提交
dcdf917508

+ 0 - 61
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/introduction/IntroductionModel.java

@@ -1,61 +0,0 @@
-package kr.co.zumo.app.lifeplus.view.screen.introduction;
-
-import kr.co.zumo.app.lifeplus.model.Model;
-
-/**
- * IntroductionModel
- * <pre>
- * </pre>
- *
- * @author 하세미
- * @version 1.0
- * @history 하세미   [2018-12-28]   [최초 작성]
- * @since 2018-12-28
- */
-public class IntroductionModel extends Model {
-
-  private int index;
-
-  @Override
-  protected void createViewInternal() {
-
-  }
-
-  @Override
-  protected void destroyInternal() {
-
-  }
-
-  @Override
-  protected void destroyViewInternal() {
-
-  }
-
-  @Override
-  protected void startInternal() {
-
-  }
-
-  @Override
-  protected void stopInternal() {
-
-  }
-
-  @Override
-  protected void resumeInternal() {
-
-  }
-
-  @Override
-  protected void pauseInternal() {
-
-  }
-
-  public void setCurrentIndex(int index) {
-    this.index = index;
-  }
-
-  public int getCurrentIndex() {return index;}
-
-  ;
-}

+ 0 - 16
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/introduction/LifeplusIntroductionFragment.java

@@ -117,21 +117,5 @@ public class LifeplusIntroductionFragment extends FragmentBase<LifeplusIntroduct
     this.index = index;
     pagerAdapter.setCurrentIndex(index);
   }
-
-
-//  private void drawTabLayout() {
-//    LayoutInflater layoutInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-//    View container = layoutInflater.inflate(R.layout.activity_main, null);
-//    View tabView = layoutInflater.inflate(R.layout.life_plus_introduction_tab_layout, null);
-//    ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-//    if (null != tabView) {
-//      Log.e("APP#  LifeplusIntroductionFragment | drawTabLayout", "|" + "tab view is not null");
-//      coordinatorLayout.addView(tabView, params);
-//      tabLayoutIntroduction = tabView.findViewById(R.id.life_plus_tab_layout);
-//      tabLayoutIntroduction.setTabGravity(TabLayout.GRAVITY_FILL);
-//      tabLayoutIntroduction.setupWithViewPager(viewPagerIntroduction, true);
-//    }
-//  }
-
 }
 

+ 2 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/introduction/LifeplusIntroductionPagerAdapter.java

@@ -4,6 +4,7 @@ import android.support.annotation.Nullable;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentStatePagerAdapter;
+import android.util.Log;
 
 import kr.co.zumo.app.lifeplus.view.IEventListener;
 import kr.co.zumo.app.lifeplus.view.screen.introduction.brand.LifeplusBrandFragment;
@@ -39,7 +40,6 @@ public class LifeplusIntroductionPagerAdapter extends FragmentStatePagerAdapter
       case 0:
         guideFragment = new GuideFragment();
         guideFragment.setListener(listener);
-
         return guideFragment;
       case 1:
         LifeplusBrandFragment lifeplusBrandFragment = new LifeplusBrandFragment();
@@ -63,6 +63,7 @@ public class LifeplusIntroductionPagerAdapter extends FragmentStatePagerAdapter
 
   public void setCurrentIndex(int index){
     this.index = index;
+    Log.e("APP#  LifeplusIntroductionPagerAdapter | setCurrentIndex", "|" + index);
     guideFragment.setIndex(index);
   }
 }

+ 21 - 4
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/introduction/LifeplusIntroductionPresenter.java

@@ -1,9 +1,14 @@
 package kr.co.zumo.app.lifeplus.view.screen.introduction;
 
+import android.support.annotation.IntRange;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
 import kr.co.zumo.app.R;
+import kr.co.zumo.app.lifeplus.bean.BucketDeliveryBean;
+import kr.co.zumo.app.lifeplus.bean.api.BucketWithTagBean;
 import kr.co.zumo.app.lifeplus.helper.NavigationBar;
 import kr.co.zumo.app.lifeplus.model.BlankModel;
-import kr.co.zumo.app.lifeplus.model.SuperModel;
 import kr.co.zumo.app.lifeplus.supervisor.ScreenID;
 import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
@@ -86,15 +91,19 @@ public class LifeplusIntroductionPresenter extends Presenter<BlankModel, IIntrod
         showErrorDialog(R.string.ready_comment);
         break;
       case Event.BUCKET:
-        if (SuperModel.getInstance().isMember()) {
-          go(ScreenID.BUCKET);
+        if (model.isMember()) {
+          model.setDeliveryPackaging(getBucketDeliveryBean(ScreenID.BUCKET, null, null));
+          go(ScreenID.BUCKET_ACTIVITY);
         }
         else {
           showPopupForGuest();
         }
         break;
       case Event.COUPON_MALL:
-          go(ScreenID.COUPON_MALL);
+        go(ScreenID.COUPON_MALL);
+        break;
+      case Event.JOINED:
+        go(ScreenID.SIGN_UP_START);
         break;
       case Event.SCROLL:
         view.setCurrentIndex(event.getIndex());
@@ -143,6 +152,14 @@ public class LifeplusIntroductionPresenter extends Presenter<BlankModel, IIntrod
       .show();
   }
 
+  private BucketDeliveryBean getBucketDeliveryBean(@NonNull @ScreenID.ID @IntRange(from = 0, to = 1000) int id, @Nullable String title, @Nullable BucketWithTagBean bean) {
+    BucketDeliveryBean bucketDeliveryBean = new BucketDeliveryBean();
+    bucketDeliveryBean.setScreenId(id);
+    bucketDeliveryBean.setTitle(title);
+    bucketDeliveryBean.setBucketWithTagBean(bean);
+    return bucketDeliveryBean;
+  }
+
   @Override
   public void onNavigationClickBack(NavigationBar navigationBar) {
     super.onNavigationClickBack(navigationBar);

+ 3 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/introduction/guide/GuideLastViewHolder.java

@@ -8,6 +8,7 @@ import android.view.View;
 import android.widget.ImageView;
 
 import kr.co.zumo.app.R;
+import kr.co.zumo.app.lifeplus.model.SuperModel;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.IEventListener;
 import kr.co.zumo.app.lifeplus.view.custom.WhiteButtonWithArrowView;
@@ -37,6 +38,8 @@ public class GuideLastViewHolder extends GuideView {
 
   @Override
   public void init(IEventListener listener) {
+
+    if (SuperModel.getInstance().isMember()) {whiteButtonWithArrowView.setVisibility(View.GONE);}
     whiteButtonWithArrowView.setOnClickListener(view -> {
       if (null != listener) {
         listener.onEvent(new Event.Builder(Event.JOINED).build());