|
|
@@ -4,6 +4,8 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.fragment;
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
+import android.support.v4.app.DialogFragment;
|
|
|
+import android.util.Log;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
@@ -11,8 +13,12 @@ import android.widget.Button;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.manager.ActionBarManager;
|
|
|
+import kr.co.zumo.app.lifeplus.supervisor.DialogManager;
|
|
|
import kr.co.zumo.app.lifeplus.supervisor.FragmentChanger;
|
|
|
import kr.co.zumo.app.lifeplus.supervisor.ScreenChangerHelper;
|
|
|
+import kr.co.zumo.app.lifeplus.view.dialog.DialogID;
|
|
|
+import kr.co.zumo.app.lifeplus.view.dialog.DialogResult;
|
|
|
+import kr.co.zumo.app.lifeplus.view.dialog.IDialogResultListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.fragment.factory.BasicFragmentFactory;
|
|
|
import kr.co.zumo.app.lifeplus.view.presenter.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.presenter.IMainView;
|
|
|
@@ -38,6 +44,7 @@ public class MainFragment extends FragmentBase<MainPresenter> implements IMainVi
|
|
|
@Override
|
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
|
|
// Inflate the layout for this fragment
|
|
|
+ showAddRegistrationDialog();
|
|
|
return inflater.inflate(R.layout.fragment_main, container, false);
|
|
|
}
|
|
|
|
|
|
@@ -78,4 +85,26 @@ public class MainFragment extends FragmentBase<MainPresenter> implements IMainVi
|
|
|
presenter.onEvent(Event.SIGN_UP);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ private void showAddRegistrationDialog() {
|
|
|
+ DialogManager dialog = new DialogManager();
|
|
|
+ dialog.show(getFragmentManager(), DialogID.ADD_REGISTRATION, new IDialogResultListener() {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDialogResult(DialogFragment dialog, int resultCode, String resultString) {
|
|
|
+ switch (resultCode) {
|
|
|
+ case DialogResult.CODE_EMAIL_CLICK:
|
|
|
+ Log.e("APP# MainFragment | onDialogResult", "|" + "add email button click");
|
|
|
+ break;
|
|
|
+ case DialogResult.CODE_SPECIAL_CODE_CLICK:
|
|
|
+ Log.e("APP# MainFragment | onDialogResult", "|" + "special code button click");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|