Browse Source

[회원가입][New] 온보딩->가입하기 준비

hyodong.min 7 years ago
parent
commit
d304f064a3

+ 2 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/Event.java

@@ -58,14 +58,14 @@ public class Event {
   public static final int DELETE = 30;
   public static final int MEMBER_DELETE_COMPLETED = 31;
   public static final int MEMBER_DELETE_ERROR = 32;
-
+  public static final int TUTORIAL_END = 33;
 
   @Retention(RetentionPolicy.SOURCE)
   @IntDef({
     NONE, CLICK, BACK, SIGN_UP, LOGIN, CHECK, UNCHECK, JOINED, TUTORIAL_LEFT, TUTORIAL_RIGHT,
     RETRY, INPUT_PIN, NETWORK_CONNECTED, CHANGED, INIT, DETAIL, ERROR, UNLOCK, RESET,
     SUCCESS, FAIL, CANCEL, EMAIL_CLICK, SPECIAL_CODE_CLICK, CONFIRM, RESULT, FAQ, DELETE,
-    MEMBER_DELETE_COMPLETED, MEMBER_DELETE_ERROR,
+    MEMBER_DELETE_COMPLETED, MEMBER_DELETE_ERROR, TUTORIAL_END,
   })
   public @interface ID {}
 

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/tutorial/TutorialPagerAdapter.java

@@ -124,7 +124,7 @@ public class TutorialPagerAdapter extends PagerAdapter {
         bottomBar.setVisibility(View.GONE);
         view = layoutInflater.inflate(R.layout.tutorial_last, container, false);
         Button buttonStart = view.findViewById(R.id.button_start_main);
-        buttonStart.setOnClickListener(v -> presenter.onEvent(new Event.Builder(Event.TUTORIAL_LEFT).build()));
+        buttonStart.setOnClickListener(v -> presenter.onEvent(new Event.Builder(Event.TUTORIAL_END).build()));
         break;
       default:
         break;

+ 5 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/presenter/TutorialPresenter.java

@@ -103,7 +103,12 @@ public class TutorialPresenter extends Presenter<TutorialModel, ITutorialView> {
           // 다음
           view.onNextButtonClick();
           break;
+        case Event.TUTORIAL_END:
+          // 시작하기, tutorial 본 것으로 표시
+          SuperModel.getInstance().getPreferences().setTutorialDone(true);
 
+          onCommand(new ActivityChangeCommand(ScreenID.ACTIVITY_SIGN_UP, ScreenID.DIRECTION_NEXT));
+          break;
         default:
           break;
       }