Browse Source

[튜토리얼][New] TutorialActivity, AppSetting 추가

hyodong.min 7 years ago
parent
commit
76d13a4f90

+ 1 - 4
app/src/main/AndroidManifest.xml

@@ -23,12 +23,9 @@
         <category android:name="android.intent.category.LAUNCHER"/>
       </intent-filter>
     </activity>
-    <activity
-      android:name=".lifeplus.view.fragment.TutorialFragment"
-      android:label="@string/title_activity_tutorial"
-      android:theme="@style/AppTheme.NoActionBar"/>
     <activity android:name=".lifeplus.activity.MainActivity"/>
     <activity android:name=".lifeplus.activity.LoginActivity"/>
+    <activity android:name=".lifeplus.activity.TutorialActivity"/>
   </application>
 
 </manifest>

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/activity/SplashActivity.java

@@ -20,7 +20,7 @@ public class SplashActivity extends AppCompatActivity {
   protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     //setContentView(R.layout.activity_splash);
-    Intent intent = new Intent(this, MainActivity.class);
+    Intent intent = new Intent(this, TutorialActivity.class);
     startActivity(intent);
     finish();
   }

+ 24 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/activity/TutorialActivity.java

@@ -0,0 +1,24 @@
+/*
+ * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
+ */
+package kr.co.zumo.app.lifeplus.activity;
+
+import kr.co.zumo.app.lifeplus.activity.setting.IAppSetting;
+import kr.co.zumo.app.lifeplus.activity.setting.TutorialAppSetting;
+
+/**
+ * TutorialActivity
+ * <pre>
+ * </pre>
+ *
+ * @author 민효동
+ * @version 1.0
+ * @history 민효동   [2018. 9. 19.]   [최초 작성]
+ * @since 2018. 9. 19.
+ */
+public class TutorialActivity extends ActivityBase {
+  @Override
+  IAppSetting getAppSetting() {
+    return new TutorialAppSetting();
+  }
+}

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/activity/setting/MainAppSetting.java

@@ -27,6 +27,6 @@ public class MainAppSetting implements IAppSetting {
     // 메인 화면 표시
     ScreenChangerHelper helper = ScreenChangerHelper.getInstance();
     ScreenChanger screenChanger = new FragmentChanger(helper.getFragmentActivity(), helper.getContainerId(), new BasicFragmentFactory());
-    screenChanger.changeTo(ScreenID.TUTORIAL);
+    screenChanger.changeTo(ScreenID.MAIN);
   }
 }

+ 31 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/activity/setting/TutorialAppSetting.java

@@ -0,0 +1,31 @@
+/*
+ * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
+ */
+package kr.co.zumo.app.lifeplus.activity.setting;
+
+import kr.co.zumo.app.lifeplus.supervisor.FragmentChanger;
+import kr.co.zumo.app.lifeplus.supervisor.ScreenChanger;
+import kr.co.zumo.app.lifeplus.supervisor.ScreenChangerHelper;
+import kr.co.zumo.app.lifeplus.supervisor.ScreenID;
+import kr.co.zumo.app.lifeplus.view.fragment.factory.BasicFragmentFactory;
+
+/**
+ * TutorialAppSetting
+ * <pre>
+ * </pre>
+ *
+ * @author 민효동
+ * @version 1.0
+ * @history 민효동   [2018. 9. 19.]   [최초 작성]
+ * @since 2018. 9. 19.
+ */
+public class TutorialAppSetting implements IAppSetting {
+  @Override
+  public void startFragment() {
+
+    // 메인 화면 표시
+    ScreenChangerHelper helper = ScreenChangerHelper.getInstance();
+    ScreenChanger screenChanger = new FragmentChanger(helper.getFragmentActivity(), helper.getContainerId(), new BasicFragmentFactory());
+    screenChanger.changeTo(ScreenID.TUTORIAL);
+  }
+}