Bladeren bron

[회원가입][Common] 휴대폰 인증 애니메이션 적용

Hasemi 6 jaren geleden
bovenliggende
commit
c9a0656308

+ 4 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/auth/IMobileAuthContract.java

@@ -177,6 +177,10 @@ public interface IMobileAuthContract {
      */
     void setEnabledInput(boolean isEnabled);
 
+    void doAnimationStart();
+
+    void setAnimationSetting();
+
     void showEditTextAuthorizedNumberKeyboard();
 
     void dispose();

+ 34 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/auth/MobileAuthView.java

@@ -13,6 +13,7 @@ import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.animation.DecelerateInterpolator;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AdapterView;
 import android.widget.CheckBox;
@@ -53,6 +54,7 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
   private LinearLayout scrollViewLinearLayout;
   private LinearLayout phoneIdentifyLayout;
   private LinearLayout agreeListLayout;
+  private LinearLayout layoutContainer;
 
   private EditText editTextName;
   private RadioButton radioSelectLocal;
@@ -120,6 +122,7 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
     buttonConfirm = findViewById(R.id.button_phone_identify_confirm);
     buttonTimeExpansion = findViewById(R.id.button_phone_identify_time_expansion);
     buttonIdentifyNumberSend = findViewById(R.id.button_identify_number_send);
+    layoutContainer = findViewById(R.id.layout_container);
 
     editTextName = findViewById(R.id.edit_text_name);
     radioSelectLocal = findViewById(R.id.radio_button_local);
@@ -149,6 +152,12 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
     viewFirstNumberBar = findViewById(R.id.spinner_first_phone_number_bar);
     viewAgreeBar = findViewById(R.id.checkbox_all_agree_bar);
 
+
+    //애니메이션시작
+
+    setAnimationSetting();
+    doAnimationStart();
+
     checkBoxAllDriver = new CheckBoxAllDriver(checkBoxAllAgree);
 
     // 전체 약관 동의
@@ -536,6 +545,31 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
 
   }
 
+  @Override
+  public void doAnimationStart() {
+    layoutContainer.animate()
+      .translationX(0f)
+      .alpha(1f)
+      .setDuration(1000)
+      .setInterpolator(new DecelerateInterpolator(1.5f))
+      .withLayer()
+      .start();
+
+    buttonConfirm.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);
+    buttonConfirm.setAlpha(0.0F);
+  }
+
   @Override
   public void showEditTextAuthorizedNumberKeyboard() {
     editTextAuthorizedNumber.requestFocus();

+ 7 - 1
app/src/main/res/layout/sign_up_auth_view.xml

@@ -19,6 +19,12 @@
     android:focusableInTouchMode="true"
     android:orientation="vertical">
 
+    <LinearLayout
+      android:id="@+id/layout_container"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="vertical"
+      >
     <LinearLayout
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
@@ -683,7 +689,7 @@
       android:layout_width="match_parent"
       android:layout_height="0dp"
       android:layout_weight="1"/>
-
+    </LinearLayout>
     <LinearLayout
       android:layout_width="match_parent"
       android:layout_height="wrap_content"