Explorar o código

[회원가입][Common] 회원가입 프래그먼트 변경 중

Hasemi %!s(int64=7) %!d(string=hai) anos
pai
achega
665a61de15

+ 25 - 12
app/src/main/java/kr/co/zumo/app/lifeplus/activity/SignUpActivity.java

@@ -4,17 +4,18 @@
 package kr.co.zumo.app.lifeplus.activity;
 
 import android.os.Bundle;
-import android.support.v7.widget.LinearLayoutManager;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentTransaction;
 import android.support.v7.widget.RecyclerView;
 
 import kr.co.zumo.app.R;
-import kr.co.zumo.app.lifeplus.application.App;
 import kr.co.zumo.app.lifeplus.manager.ActionBarManager;
-import kr.co.zumo.app.lifeplus.view.ISignUpView;
 import kr.co.zumo.app.lifeplus.model.SignUpModel;
-import kr.co.zumo.app.lifeplus.view.presenter.SignUpPresenter;
 import kr.co.zumo.app.lifeplus.supervisor.DialogHelper;
+import kr.co.zumo.app.lifeplus.view.ISignUpView;
 import kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpAdapter;
+import kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpStartFragment;
+import kr.co.zumo.app.lifeplus.view.presenter.SignUpPresenter;
 
 /**
  * SignUpActivity
@@ -34,7 +35,7 @@ public class SignUpActivity extends ActivityBase<SignUpPresenter> implements ISi
   @Override
   void onAfterCreate(Bundle savedInstanceState) {
 
-    setContentView(R.layout.fragment_sign_up);
+    setContentView(R.layout.activity_sign_up);
 
     DialogHelper.getInstance().setFragmentManager(getSupportFragmentManager());
 
@@ -43,7 +44,7 @@ public class SignUpActivity extends ActivityBase<SignUpPresenter> implements ISi
 //    presenter.onCommand(new FragmentChangeCommand(ScreenID.MAIN));
 
 
-    adapter = new SignUpAdapter(presenter);
+  /*  adapter = new SignUpAdapter(presenter);
 
     recyclerView = findViewById(R.id.sign_up_list);
     recyclerView.setHasFixedSize(true);
@@ -52,29 +53,41 @@ public class SignUpActivity extends ActivityBase<SignUpPresenter> implements ISi
     recyclerView.setAdapter(adapter);
 
 
-    presenter.start();
+    presenter.start();*/
+
+    FragmentManager manager = getSupportFragmentManager();
+    FragmentTransaction fragmentTransaction = manager.beginTransaction();
+    SignUpStartFragment fragment = new SignUpStartFragment();
+    fragmentTransaction.add(R.id.sign_up_container, fragment);
+    fragmentTransaction.commit();
   }
 
   @Override
   protected void onDestroy() {
     super.onDestroy();
-
-    presenter.dispose();
+    //presenter.dispose();
   }
 
   @Override
   void defineActionBar() {
     ActionBarManager actionBarManager = ActionBarManager.getInstance();
     actionBarManager.setTitle(R.string.sign_up);
-    actionBarManager.setDisplayHomeAsUpEnabled(true);
+
+/*    actionBarManager.setDisplayShowHomeEnabled(false);
+    actionBarManager.setDisplayShowTitleEnabled(false);
+
+    View customActionBar = LayoutInflater.from(this).inflate(R.layout.sign_up_action_bar, null);
+    actionBarManager.setDisplayShowCustomEnabled(true);
+    actionBarManager.setCustomView(customActionBar);*/
+
   }
 
   /**
-   * recyclerView 에 아이템이 변경되었음을 알려준다.
+   * recyclerView 에 아이템이 변경되었음을 알려준다..
    */
   @Override
   public void notifyItemChanged() {
-    adapter.notifyItemChanged(recyclerView, presenter.getSignUpList());
+    //adapter.notifyItemChanged(recyclerView, presenter.getSignUpList());
   }
 }
 

+ 87 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/signup/SignUpAgreeFragment.java

@@ -0,0 +1,87 @@
+package kr.co.zumo.app.lifeplus.view.fragment.signup;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CheckBox;
+
+import java.util.ArrayList;
+
+import kr.co.zumo.app.R;
+import kr.co.zumo.app.lifeplus.bean.SignUpAgreeItemBean;
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
+import kr.co.zumo.app.lifeplus.view.CheckBoxAllDriver;
+
+
+/**
+ * SignUpAgreeFragment
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2018-09-21]   [최초 작성]
+ * @since 2018-09-21
+ */
+public class SignUpAgreeFragment extends Fragment {
+
+  private View itemView;
+  private ArrayList<SignUpAgreeItemBean> items;
+  private CheckBox checkBoxAll;
+  private CheckBoxAllDriver checkBoxAllDriver;
+  private int len;
+
+  @Override
+  public void onCreate(@Nullable Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+  }
+
+  @Nullable
+  @Override
+  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+    itemView = inflater.inflate(R.layout.fragment_sign_up_agree, container, false);
+    return itemView;
+  }
+
+  @Override
+  public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+    super.onActivityCreated(savedInstanceState);
+    checkBoxAll = getView().findViewById(R.id.agree_check_all);
+    checkBoxAllDriver = new CheckBoxAllDriver(checkBoxAll);
+
+    checkBoxAll.setText(R.string.all_agree);
+    checkBoxAll.setOnClickListener(v -> {
+      checkBoxAllDriver.applyCheckAll(checkBoxAll.isChecked());
+      checkAll(checkBoxAll.isChecked());
+      notifyAgreeChanged();
+    });
+
+
+  }
+
+
+  private CheckBox getCheckBoxByIndex(int index) {
+    return itemView.findViewById(ResourceUtil.getId("agree_check" + index));
+  }
+
+  private void notifyAgreeChanged() {
+  }
+
+  private void notifyDetailPressed(int index, String data) {
+    Log.i("APP# SignUpAgreeHolder | draw", "| index: " + index + ", data: " + data);
+
+  }
+
+  private void checkAll(boolean isChecked) {
+    SignUpAgreeItemBean bean;
+    for (int i = 0; i < len; ++i) {
+      bean = items.get(i);
+      bean.setChecked(isChecked);
+    }
+  }
+}

+ 34 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/signup/SignUpAuthorizationResultFragment.java

@@ -0,0 +1,34 @@
+package kr.co.zumo.app.lifeplus.view.fragment.signup;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * SignUpAuthorizationResultFragment
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2018-09-21]   [최초 작성]
+ * @since 2018-09-21
+ */
+public class SignUpAuthorizationResultFragment extends Fragment {
+
+  @Override
+  public void onCreate(@Nullable Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+  }
+
+  @Nullable
+  @Override
+  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+    return super.onCreateView(inflater, container, savedInstanceState);
+  }
+
+}

+ 43 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/signup/SignUpStartFragment.java

@@ -0,0 +1,43 @@
+package kr.co.zumo.app.lifeplus.view.fragment.signup;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import kr.co.zumo.app.R;
+
+/**
+ * SignUpStartFragment
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2018-09-21]   [최초 작성]
+ * @since 2018-09-21
+ */
+public class SignUpStartFragment extends Fragment {
+
+  private View itemView;
+
+  @Override
+  public void onCreate(@Nullable Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+  }
+
+  @Nullable
+  @Override
+  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+    itemView = inflater.inflate(R.layout.fragment_sign_up_agree, container, false);
+    return itemView;
+  }
+
+  @Override
+  public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+    super.onActivityCreated(savedInstanceState);
+  }
+}

+ 3 - 5
app/src/main/res/layout/activity_sign_up.xml

@@ -4,11 +4,9 @@
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical">
-
-  <android.support.v7.widget.RecyclerView
-    android:id="@+id/sign_up_list"
+  <android.support.constraint.ConstraintLayout
+    android:id="@+id/sign_up_container"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    />
+    android:layout_height="match_parent"    />
 
 </LinearLayout>

+ 17 - 6
app/src/main/res/layout/fragment_sign_up_agree.xml

@@ -3,8 +3,8 @@
 <LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools"
-  android:layout_width="300dp"
-  android:layout_height="wrap_content"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent"
   android:orientation="vertical">
 
   <CheckBox
@@ -28,7 +28,6 @@
   <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_weight="5"
     android:orientation="horizontal">
 
     <CheckBox
@@ -88,18 +87,17 @@
   </LinearLayout>
 
   <LinearLayout
-    android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_weight="5"
+    android:layout_width="match_parent"
     android:orientation="horizontal">
 
     <CheckBox
       android:id="@+id/agree_check2"
       android:layout_width="0dp"
+      android:layout_weight="4"
       android:layout_height="wrap_content"
       android:layout_marginLeft="5pt"
       android:layout_marginTop="3pt"
-      android:layout_weight="4"
       android:textSize="15dp"
       tools:text="@string/phone_identify_agree2"
       />
@@ -207,6 +205,19 @@
       android:textSize="15dp"
       />
   </LinearLayout>
+  <LinearLayout
+    android:layout_width="match_parent"
+    android:gravity="bottom"
+    android:orientation="vertical"
+    android:layout_height="match_parent">
+    <Button
+      android:layout_gravity="center"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:text="약관동의 완료"
+      />
+
+  </LinearLayout>
 
 
 </LinearLayout>

+ 136 - 0
app/src/main/res/layout/fragment_sign_up_authorization_result.xml

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent"
+  android:orientation="vertical">
+
+  <LinearLayout
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    >
+
+    <ImageView
+
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_gravity="center"      android:src="@drawable/sign_up_authorization_result"/>
+
+    <TextView
+      android:layout_width="wrap_content"
+      android:layout_height="56dp"
+      android:layout_gravity="center"
+      android:text="@string/sign_up_id_confirm_completed"
+      android:textAlignment="center"
+      android:textSize="20dp"
+      />
+
+    <View
+      android:layout_width="358dp"
+      android:layout_height="1dp"
+      android:layout_marginLeft="28dp"
+      android:layout_marginRight="28dp"
+      android:background="@color/darkGrey"/>
+
+  </LinearLayout>
+
+  <LinearLayout
+    android:gravity="bottom"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="vertical"
+      >
+
+    <LinearLayout
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="horizontal"
+      android:weightSum="4">
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="이름"
+        />
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="김한화"
+        />
+    </LinearLayout>
+
+
+    <LinearLayout
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="horizontal"
+      android:weightSum="4">
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="성별"
+        />
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="@string/phone_identify_male"
+        />
+    </LinearLayout>
+
+    <LinearLayout
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="horizontal"
+      android:weightSum="4">
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="생년월일"
+        />
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="1982.02.20"
+        />
+    </LinearLayout>
+
+    <LinearLayout
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="horizontal"
+      android:weightSum="4">
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="전화번호"
+        />
+
+      <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="010-2934-3901"
+        />
+    </LinearLayout>
+    </LinearLayout>
+  </LinearLayout>
+  </LinearLayout>

+ 115 - 0
app/src/main/res/layout/fragment_sign_up_start.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent"
+  android:orientation="vertical"
+  >
+
+  <LinearLayout
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginLeft="28dp"
+    android:layout_marginRight="28dp"
+    android:orientation="vertical">
+
+    <TextView
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="64dp"
+      android:text="@string/sign_up_hello_text"
+      android:textSize="24dp"
+      />
+
+
+    <TextView
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="20dp"
+      android:text="@string/sign_up_need_id"
+      android:textSize="16dp"
+      />
+
+  </LinearLayout>
+    <LinearLayout
+      android:layout_marginTop="88dp"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:layout_marginBottom="40dp"
+      android:orientation="vertical">
+
+      <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/darkGrey"/>
+
+    </LinearLayout>
+
+
+    <LinearLayout
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:layout_marginLeft="28dp"
+      android:layout_marginRight="28dp"
+      android:orientation="vertical">
+
+      <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/sign_up_benefit1"
+        android:textSize="16dp"
+        />
+
+      <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="20dp"
+        android:text="@string/sign_up_benefit1_detail"
+        android:textSize="14dp"
+        />
+
+      <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/sign_up_benefit2"
+        android:textSize="16dp"
+        />
+
+      <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="20dp"
+        android:text="@string/sign_up_benefit2_detail"
+        android:textSize="14dp"
+        />
+
+
+      <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/sign_up_benefit3"
+        android:textSize="16dp"
+        />
+
+      <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/sign_up_benefit3_detail"
+        android:textSize="14dp"
+        />
+    </LinearLayout>
+      <LinearLayout
+        android:gravity="center"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="80dp"
+        >
+        <Button
+          android:layout_width="104dp"
+          android:layout_height="44dp"
+          android:text="@string/sign_up_mobile_identify_pop_up"
+          android:textSize="14dp"
+          />
+
+      </LinearLayout>
+</LinearLayout>

+ 24 - 14
app/src/main/res/layout/sign_up_phone_identify_dialog.xml

@@ -377,27 +377,37 @@
       android:layout_height="wrap_content"
       android:orientation="vertical">
 
-      <kr.co.zumo.app.lifeplus.view.custom.ClearEditText
-        android:id="@+id/edit_text_phone_number"
+      <RelativeLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="5pt"
-        android:layout_marginRight="5pt"
-        android:layout_marginTop="5pt"
-        android:maxLength="8"
-        android:background="@drawable/input_border"
-        android:hint="@string/phone_identify_phone_hint"
-        android:inputType="number"
-        android:padding="3pt"/>
+        android:layout_height="wrap_content">
+
+        <kr.co.zumo.app.lifeplus.view.custom.ClearEditText
+          android:id="@+id/edit_text_phone_number"
+          android:layout_width="match_parent"
+          android:layout_height="wrap_content"
+          android:layout_marginLeft="10pt"
+          android:paddingLeft="10dp"
+          android:padding="5dp"
+          android:layout_marginRight="5pt"
+          android:layout_marginTop="5pt"
+          android:text="ddddddddddddddddddddddddd"
+          android:maxLength="8"
+          android:paddingBottom="40dp"
+          android:background="@drawable/input_border"
+          />
 
         <TextView
           android:id="@+id/text_view_phone_number_validation"
-          android:layout_width="match_parent"
+          android:layout_width="wrap_content"
           android:layout_height="wrap_content"
+          android:layout_marginLeft="15pt"
+          android:layout_marginTop="50dp"
+          android:paddingLeft="10dp"
+          android:text=""
           android:textColor="@color/red"
-          android:layout_marginLeft="5pt"
-          android:layout_marginBottom="20dp"
           />
+      </RelativeLayout>
 
       <Button
         android:id="@+id/button_identify_number_send"