Browse Source

Merge branch 'develop' of https://github.com/swict/LifeplusAndroid into develop

hyodong.min 6 years ago
parent
commit
36afa580cd

+ 4 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/ISignUpStartView.java

@@ -20,4 +20,8 @@ import kr.co.zumo.app.lifeplus.bean.api.SignUpBannerBean;
 public interface ISignUpStartView extends ISignUpView {
 
   void drawBanners(ArrayList<SignUpBannerBean> beans);
+
+  void doAnimationStart();
+
+  void setAnimationSetting();
 }

+ 33 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpStartFragment.java

@@ -6,13 +6,16 @@ import android.support.annotation.Nullable;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.animation.DecelerateInterpolator;
 import android.widget.Button;
+import android.widget.LinearLayout;
 
 import java.util.ArrayList;
 
 import kr.co.zumo.app.R;
 import kr.co.zumo.app.lifeplus.bean.api.SignUpBannerBean;
 import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.custom.BannerView;
 import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
@@ -29,6 +32,9 @@ import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
  */
 public class SignUpStartFragment extends FragmentBase<SignUpStartPresenter> implements ISignUpStartView {
 
+  protected Button button;
+  protected LinearLayout layoutContainer;
+
   @Nullable
   @Override
   protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -37,8 +43,8 @@ public class SignUpStartFragment extends FragmentBase<SignUpStartPresenter> impl
 
   @Override
   protected void onAfterActivityCreated(Bundle savedInstanceState) {
-
-    Button button = getView().findViewById(R.id.button_confirm);
+    layoutContainer = getView().findViewById(R.id.layout_container);
+    button = getView().findViewById(R.id.button_confirm);
     button.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.SUCCESS).build()));
 
   }
@@ -51,6 +57,31 @@ public class SignUpStartFragment extends FragmentBase<SignUpStartPresenter> impl
     }
   }
 
+  @Override
+  public void doAnimationStart() {
+    layoutContainer.animate()
+      .translationX(0f)
+      .alpha(1f)
+      .setDuration(1000)
+      .setInterpolator(new DecelerateInterpolator(1.5f))
+      .withLayer()
+      .start();
+
+    button.animate()
+      .alpha(1f)
+      .setDuration(1000)
+      .setInterpolator(new DecelerateInterpolator(1.5f))
+      .withLayer()
+      .start();
+  }
+
+  @Override
+  public void setAnimationSetting() {
+    layoutContainer.setTranslationX(ResourceUtil.dpToPx(100));
+    layoutContainer.setAlpha(0.0F);
+    button.setAlpha(0.0F);
+  }
+
   @Override
   protected SignUpStartPresenter definePresenter() {
     return new SignUpStartPresenter(getModel(SignUpStartModel.class), this);

+ 4 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpStartOnBoardingFragment.java

@@ -26,6 +26,7 @@ import kr.co.zumo.app.lifeplus.view.Event;
  */
 public class SignUpStartOnBoardingFragment extends SignUpStartFragment {
 
+
   @Nullable
   @Override
   protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -43,8 +44,9 @@ public class SignUpStartOnBoardingFragment extends SignUpStartFragment {
     title.setText(R.string.sign_up_hello_from_on_boarding);
     description.setText(R.string.sign_up_hello_from_on_boarding_detail);
 
-    View buttonAuthorization = parent.findViewById(R.id.button_confirm);
-    buttonAuthorization.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.SUCCESS).build()));
+    layoutContainer = getView().findViewById(R.id.layout_container);
+    button = getView().findViewById(R.id.button_confirm);
+    button.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.SUCCESS).build()));
   }
 
   @Override

+ 3 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpStartPresenter.java

@@ -98,7 +98,7 @@ public class SignUpStartPresenter extends SignUpBasePresenter<SignUpStartBaseMod
   protected void onEventInternal(Event event) {
     switch (event.getEventId()) {
       case Event.SUCCESS:
-        go(ScreenID.SIGN_UP_MOBILE_AUTHORIZATION);
+        go(ScreenID.SIGN_UP_MOBILE_AUTHORIZATION, ScreenID.DIRECTION_NONE);
         break;
       default:
         break;
@@ -117,6 +117,8 @@ public class SignUpStartPresenter extends SignUpBasePresenter<SignUpStartBaseMod
   private void renderAfterReady() {
     view.drawBanners(getBannerItems());
     getHelper(ActionBarHelper.class).setProgress(8);
+    view.setAnimationSetting();
+    view.doAnimationStart();
 
   }
 

+ 3 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpStartZumoFragment.java

@@ -43,8 +43,9 @@ public class SignUpStartZumoFragment extends SignUpStartFragment {
     title.setText(R.string.sign_up_from_zumo_title);
     description.setText(R.string.sign_up_from_zumo_description);
 
-    View buttonAuthorization = parent.findViewById(R.id.button_confirm);
-    buttonAuthorization.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.SUCCESS).build()));
+    layoutContainer = getView().findViewById(R.id.layout_container);
+    button = getView().findViewById(R.id.button_confirm);
+    button.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.SUCCESS).build()));
 
   }
 

+ 1 - 0
app/src/main/res/layout/fragment_sign_up_start1.xml

@@ -9,6 +9,7 @@
   >
 
   <LinearLayout
+    android:id="@+id/layout_container"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginStart="24dp"

+ 54 - 43
app/src/main/res/layout/fragment_sign_up_start2.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<android.support.constraint.ConstraintLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   android:layout_width="match_parent"
@@ -9,68 +9,78 @@
   >
 
   <LinearLayout
-    android:layout_width="wrap_content"
+    android:id="@+id/layout_container"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_marginLeft="24dp"
-    android:layout_marginTop="53dp"
-    android:orientation="vertical">
+    android:orientation="vertical"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent">
 
-    <TextView
+    <LinearLayout
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
-      android:lineSpacingExtra="8sp"
-      android:text="@string/sign_up_hello_text"
-      android:textColor="@color/C000000"
-      android:textSize="21sp"
-      />
+      android:layout_marginStart="24dp"
+      android:layout_marginTop="53dp"
+      android:orientation="vertical">
 
-    <TextView
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_marginTop="17dp"
-      android:lineSpacingExtra="5sp"
-      android:text="@string/sign_up_need_id"
-      android:textColor="@color/C999999"
-      android:textSize="14sp"
-      />
+      <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:lineSpacingExtra="8sp"
+        android:text="@string/sign_up_hello_text"
+        android:textColor="@color/C000000"
+        android:textSize="21sp"
+        />
 
-  </LinearLayout>
+      <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="17dp"
+        android:lineSpacingExtra="5sp"
+        android:text="@string/sign_up_need_id"
+        android:textColor="@color/C999999"
+        android:textSize="14sp"
+        />
 
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginLeft="24.8dp"
-    android:layout_marginTop="76dp"
-    android:layout_marginRight="24.3dp"
-    android:layout_marginBottom="40dp"
-    android:orientation="vertical">
+    </LinearLayout>
 
-    <View
+    <LinearLayout
       android:layout_width="match_parent"
-      android:layout_height="1dp"
-      android:background="@color/CE5E5E5"/>
+      android:layout_height="wrap_content"
+      android:layout_marginStart="25dp"
+      android:layout_marginTop="76dp"
+      android:layout_marginEnd="24dp"
+      android:layout_marginBottom="40dp"
+      android:orientation="vertical">
 
-  </LinearLayout>
+      <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/CE5E5E5"/>
 
+    </LinearLayout>
 
-  <LinearLayout
-    android:id="@+id/container_banner"
-    android:layout_width="match_parent"
-    android:layout_height="0dp"
-    android:layout_marginLeft="24dp"
-    android:layout_weight="1"
-    android:orientation="vertical">
 
-    <!-- 배너 삽입 영역 -->
+    <LinearLayout
+      android:id="@+id/container_banner"
+      android:layout_width="match_parent"
+      android:layout_height="0dp"
+      android:layout_marginStart="24dp"
+      android:layout_weight="1"
+      android:orientation="vertical">
 
-  </LinearLayout>
+      <!-- 배너 삽입 영역 -->
 
+    </LinearLayout>
+  </LinearLayout>
 
   <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginBottom="30dp"
     android:gravity="center"
+    app:layout_constraintBottom_toBottomOf="parent"
     >
 
     <Button
@@ -78,7 +88,8 @@
       style="@style/SignUpButton"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
+      android:layout_gravity="bottom"
       android:text="@string/sign_up_mobile_identify_pop_up"/>
 
   </LinearLayout>
-</LinearLayout>
+</android.support.constraint.ConstraintLayout>