ソースを参照

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

hyodong.min 6 年 前
コミット
7b113d87c8

+ 2 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/helper/AppVersionHelper.java

@@ -39,8 +39,8 @@ public class AppVersionHelper {
   private Disposable disposable;
   private FirebaseRemoteConfig firebaseRemoteConfig;
 
-  private String VERSION_LATEST = "newerVersion";
-  private String VERSION_FORCE = "forceVersion";
+  private static final String VERSION_LATEST = "newerVersion";
+  private static final String VERSION_FORCE = "forceVersion";
 
   /**
    * dispose

+ 2 - 4
app/src/main/java/kr/co/zumo/app/lifeplus/util/StringUtil.java

@@ -631,10 +631,8 @@ public class StringUtil {
                   if (!realDomain[1].equalsIgnoreCase("hotmail.com") && !realDomain[1].equalsIgnoreCase("hotmail.co.kr")) {
                     return "hotmail.com";
                   }
-                } else if (domainHead.startsWith("gmail")) {
-                  if (!realDomain[1].equalsIgnoreCase("gmail.com")) {
-                    return "gmail.com";
-                  }
+                } else if (domainHead.startsWith("gmail") && !realDomain[1].equalsIgnoreCase("gmail.com")) {
+                  return "gmail.com";
                 }
               } else if (validCount <= 2) {
                 if (emailDomain.equalsIgnoreCase("naver")) {

+ 17 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/Tutorial.java

@@ -55,7 +55,7 @@ public class Tutorial {
   public void showTutorial(FragmentActivity activity, int tutorialID, IEventListener listener) {
     if (null != activity) {
       this.activity = activity;
-      frameLayout = activity.getWindow().findViewById(android.R.id.content);
+      frameLayout = this.activity.getWindow().findViewById(android.R.id.content);
       inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
       switch (tutorialID) {
@@ -111,6 +111,11 @@ public class Tutorial {
     );
   }
 
+  /**
+   * 리스티클 커버 첫 진입시 뜨는 튜토리얼
+   *
+   * @param listener
+   */
   private void showTutorialListicleCover(IEventListener listener) {
     View view = inflater.inflate(R.layout.tutorial_listicle_cover, null);
     frameLayout.addView(view);
@@ -157,6 +162,12 @@ public class Tutorial {
 
   }
 
+  /**
+   * 리스티클 첫 진입후
+   * 리스티클 상세에서 뜨는 튜토리얼
+   *
+   * @param listener
+   */
   private void showTutorialListicleDetail(IEventListener listener) {
     View view = inflater.inflate(R.layout.tutorial_listicle_detail, null);
     frameLayout.addView(view);
@@ -211,6 +222,11 @@ public class Tutorial {
 
   }
 
+  /**
+   * 버킷리스트 태그 있는 화면 첫 진입시, 뜨는 튜토리얼
+   * 태그있는 화면 -> 등록 화면 소개 페이지 두개 넘어간 후
+   * 튜토리얼 종료됨
+   */
   private void showTutorialBucketTag() {
     bucketFirstView = inflater.inflate(R.layout.tutorial_bucket_list_tag, null);
     ConstraintLayout firstContainer = bucketFirstView.findViewById(R.id.container);

+ 3 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/dialog/PromotionFullScreenDialog.java

@@ -6,6 +6,7 @@ import android.support.annotation.Nullable;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.Window;
 import android.widget.TextView;
 
 import kr.co.zumo.app.R;
@@ -33,6 +34,8 @@ public class PromotionFullScreenDialog extends PromotionDialog {
 
   @Override
   protected void onActivityCreatedInternal() {
+    Window window = getDialog().getWindow();
+    window.getAttributes().windowAnimations = R.style.PromotionDialogAnimation;
 
     mainBannerView = getView().findViewById(R.id.promotion_banner_all);
     getView().setPadding(0, ResourceUtil.getStatusBarHeightManual(), 0, ResourceUtil.getNavBarHeight());

+ 122 - 123
app/src/main/java/kr/co/zumo/app/lifeplus/zumo/sns/SignInKakao.java

@@ -40,155 +40,154 @@ import kr.co.zumo.app.lifeplus.zumo.listener.IStartSignCallback;
  */
 public class SignInKakao extends SignIn<Activity> {
 
-    private final String TAG = "SignInKakao";
+  private final String TAG = "SignInKakao";
 
-    private KakaoSessionCallback kakaoCallback;
-    private IStartSignCallback callback;
-    private ISignInListener iSignInListener;
+  private KakaoSessionCallback kakaoCallback;
+  private IStartSignCallback callback;
+  private ISignInListener iSignInListener;
 
-    public SignInKakao(Activity context, IStartSignCallback callback) {
-        super(context);
+  public SignInKakao(Activity context, IStartSignCallback callback) {
+    super(context);
 
-        try {
-            KakaoSDK.init(new KakaoSDKAdapter());
-        } catch (KakaoSDK.AlreadyInitializedException ex) {
-        }
+    try {
+      KakaoSDK.init(new KakaoSDKAdapter());
+    } catch (KakaoSDK.AlreadyInitializedException ex) {
+    }
 
-        kakaoCallback = new KakaoSessionCallback();
-        Session.getCurrentSession().addCallback(kakaoCallback);
-        this.callback = callback;
+    kakaoCallback = new KakaoSessionCallback();
+    Session.getCurrentSession().addCallback(kakaoCallback);
+    this.callback = callback;
+  }
+
+  @Override
+  public void disposeInternal() {
+    kakaoCallback = null;
+  }
+
+  @Override
+  public void signIn(final ISignInListener listener) {
+    iSignInListener = listener;
+    if (Session.getCurrentSession().isOpened()) {
+      Session.getCurrentSession().checkAndImplicitOpen();
     }
+    else {
+      if (callback != null) {
+        callback.signIn(null, 0);
+      }
+    }
+  }
+
+  private class KakaoSessionCallback implements ISessionCallback {
 
     @Override
-    public void disposeInternal() {
-        kakaoCallback = null;
+    public void onSessionOpened() {
+      getUserInformation();
     }
 
     @Override
-    public void signIn(final ISignInListener listener) {
-        iSignInListener = listener;
-        if (Session.getCurrentSession().isOpened()) {
-            Session.getCurrentSession().checkAndImplicitOpen();
-        } else {
-            if (callback != null) {
-                callback.signIn(null, 0);
-            }
-        }
+    public void onSessionOpenFailed(KakaoException exception) {
+      if (exception != null && iSignInListener != null) {
+        iSignInListener.onFailure(exception.hashCode(), exception.getLocalizedMessage());
+      }
+      removeCallback();
     }
+  }
 
-    private class KakaoSessionCallback implements ISessionCallback {
+  private void getUserInformation() {
+    List<String> propertyKeys = new ArrayList<>();
+    propertyKeys.add("properties.nickname");
+    propertyKeys.add("properties.profile_image");
+    propertyKeys.add("kakao_account.email");
 
-        @Override
-        public void onSessionOpened() {
-            getUserInformation();
+    UserManagement.getInstance().me(propertyKeys, new MeV2ResponseCallback() {
+
+      @Override
+      public void onSessionClosed(ErrorResult errorResult) {
+        if (iSignInListener != null) {
+          iSignInListener.onFailure(errorResult.getErrorCode(), errorResult.getErrorMessage());
+        }
+        removeCallback();
+      }
+
+      @Override
+      public void onSuccess(MeV2Response meV2Response) {
+        if (meV2Response != null) {
+          String email = meV2Response.getKakaoAccount() != null ? meV2Response.getKakaoAccount().getEmail() : "";
+          String profile_image = meV2Response.getProfileImagePath();
+          String id = String.valueOf(meV2Response.getId());
+          String name = meV2Response.getNickname();
+
+          Log.i(TAG, "getUserInformation() -> onSuccess() -> profile_image: " + profile_image + ", id: " + id + ", email: " + email + ", name: " + name);
+
+          if (iSignInListener != null) {
+            iSignInListener.onSuccess(new SignInResultBean(SignIn.TYPE_KAKAO, id, email, name, profile_image));
+          }
         }
+        removeCallback();
+      }
 
-        @Override
-        public void onSessionOpenFailed(KakaoException exception) {
-            if (exception != null) {
-                if (iSignInListener != null) {
-                    iSignInListener.onFailure(exception.hashCode(), exception.getLocalizedMessage());
-                }
-            }
-            removeCallback();
+      @Override
+      public void onFailure(ErrorResult errorResult) {
+        super.onFailure(errorResult);
+
+        Log.e(TAG, "getUserInformation() -> onFailure() -> errorResult: " + errorResult.getErrorMessage());
+
+        int ErrorCode = errorResult.getErrorCode();
+        if (iSignInListener != null) {
+          iSignInListener.onFailure(ErrorCode, errorResult.getErrorMessage());
         }
-    }
+        removeCallback();
+      }
+    });
+  }
 
-    private void getUserInformation() {
-        List<String> propertyKeys = new ArrayList<>();
-        propertyKeys.add("properties.nickname");
-        propertyKeys.add("properties.profile_image");
-        propertyKeys.add("kakao_account.email");
-
-        UserManagement.getInstance().me(propertyKeys, new MeV2ResponseCallback() {
-
-            @Override
-            public void onSessionClosed(ErrorResult errorResult) {
-                if (iSignInListener != null) {
-                    iSignInListener.onFailure(errorResult.getErrorCode(), errorResult.getErrorMessage());
-                }
-                removeCallback();
-            }
-
-            @Override
-            public void onSuccess(MeV2Response meV2Response) {
-                if (meV2Response != null) {
-                    String email = meV2Response.getKakaoAccount() != null ? meV2Response.getKakaoAccount().getEmail() : "";
-                    String profile_image = meV2Response.getProfileImagePath();
-                    String id = String.valueOf(meV2Response.getId());
-                    String name = meV2Response.getNickname();
-
-                    Log.i(TAG, "getUserInformation() -> onSuccess() -> profile_image: " + profile_image + ", id: " + id + ", email: " + email + ", name: " + name);
-
-                    if (iSignInListener != null) {
-                        iSignInListener.onSuccess(new SignInResultBean(SignIn.TYPE_KAKAO, id, email, name, profile_image));
-                    }
-                }
-                removeCallback();
-            }
-
-            @Override
-            public void onFailure(ErrorResult errorResult) {
-                super.onFailure(errorResult);
-
-                Log.e(TAG, "getUserInformation() -> onFailure() -> errorResult: " + errorResult.getErrorMessage());
-
-                int ErrorCode = errorResult.getErrorCode();
-                if (iSignInListener != null) {
-                    iSignInListener.onFailure(ErrorCode, errorResult.getErrorMessage());
-                }
-                removeCallback();
-            }
-        });
-    }
+  private void removeCallback() {
+    Session.getCurrentSession().removeCallback(kakaoCallback);
+  }
 
-    private void removeCallback() {
-        Session.getCurrentSession().removeCallback(kakaoCallback);
-    }
+  public static class KakaoSDKAdapter extends KakaoAdapter {
 
-    public static class KakaoSDKAdapter extends KakaoAdapter {
+    @Override
+    public ISessionConfig getSessionConfig() {
+
+      return new ISessionConfig() {
 
         @Override
-        public ISessionConfig getSessionConfig() {
-
-            return new ISessionConfig() {
-
-                @Override
-                public AuthType[] getAuthTypes() {
-                    return new AuthType[]{AuthType.KAKAO_LOGIN_ALL};
-                }
-
-                @Override
-                public boolean isUsingWebviewTimer() {
-                    return false;
-                }
-
-                @Override
-                public boolean isSecureMode() {
-                    return false;
-                }
-
-                @Override
-                public ApprovalType getApprovalType() {
-                    return ApprovalType.INDIVIDUAL;
-                }
-
-                @Override
-                public boolean isSaveFormData() {
-                    return true;
-                }
-            };
+        public AuthType[] getAuthTypes() {
+          return new AuthType[]{AuthType.KAKAO_LOGIN_ALL};
         }
 
         @Override
-        public IApplicationConfig getApplicationConfig() {
-            return () -> App.getInstance().getApplicationContext();
+        public boolean isUsingWebviewTimer() {
+          return false;
+        }
+
+        @Override
+        public boolean isSecureMode() {
+          return false;
+        }
+
+        @Override
+        public ApprovalType getApprovalType() {
+          return ApprovalType.INDIVIDUAL;
         }
-    }
 
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        if (data != null && Session.getCurrentSession().handleActivityResult(requestCode, resultCode, data)) {
-            return;
+        @Override
+        public boolean isSaveFormData() {
+          return true;
         }
+      };
+    }
+
+    @Override
+    public IApplicationConfig getApplicationConfig() {
+      return () -> App.getInstance().getApplicationContext();
+    }
+  }
+
+  public void onActivityResult(int requestCode, int resultCode, Intent data) {
+    if (data != null && Session.getCurrentSession().handleActivityResult(requestCode, resultCode, data)) {
+      return;
     }
+  }
 }

+ 1 - 1
app/src/main/res/anim/fade_in.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <alpha xmlns:android="http://schemas.android.com/apk/res/android"
-       android:duration="200"
+       android:duration="400"
        android:fromAlpha="0.0"
        android:interpolator="@android:anim/accelerate_interpolator"
        android:toAlpha="1.0"/>

+ 1 - 1
app/src/main/res/anim/fade_out.xml

@@ -2,7 +2,7 @@
 <set xmlns:android="http://schemas.android.com/apk/res/android"
      android:interpolator="@android:anim/linear_interpolator">
   <alpha
-    android:duration="200"
+    android:duration="400"
     android:fromAlpha="1.0"
     android:toAlpha="0.0">
   </alpha>

+ 3 - 3
app/src/main/res/drawable/bubble_tutorial_related_tags.xml

@@ -1,7 +1,7 @@
 <vector android:height="71dp" android:viewportHeight="282"
     android:viewportWidth="714" android:width="179dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#000" android:fillType="evenOdd" android:pathData="M334.5,22l11,-22 11,22H679v214H11V22h323.5z"/>
+    <path android:fillColor="#000" android:fillType="evenOdd" android:pathData="M70.5,22l11,-22 11,22H679v214H11V22h59.5z"/>
     <path android:fillColor="#FFF" android:fillType="evenOdd"
-        android:pathData="M13,24v210h664V24H355.264L345.5,4.472 335.736,24H13z"
-        android:strokeColor="#000" android:strokeLineJoin="bevel" android:strokeWidth="4"/>
+        android:pathData="M13,24v210h664V24H91.264L81.5,4.472 71.736,24H13z"
+        android:strokeColor="#000" android:strokeWidth="4"/>
 </vector>

+ 9 - 8
app/src/main/res/layout/tutorial_bucket_list_tag.xml

@@ -73,11 +73,11 @@
       android:layout_marginStart="25dp"
       android:layout_marginTop="18dp"
       android:lineSpacingExtra="3.5sp"
+      android:text="@string/tutorial_bucket_example"
       android:textColor="@color/C999999"
       android:textSize="12sp"
       app:layout_constraintStart_toStartOf="parent"
-      app:layout_constraintTop_toBottomOf="@+id/image_view_bucket"
-      tools:text="연관태그 추천 콘텐츠 31개"/>
+      app:layout_constraintTop_toBottomOf="@+id/image_view_bucket"/>
 
     <android.support.constraint.ConstraintLayout
       android:id="@+id/layout_tag"
@@ -93,14 +93,14 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginEnd="9dp"
-        android:background="@drawable/custom_rectangle_radio_off"
+        android:background="@drawable/custom_rectangle_radio_on"
         android:paddingStart="12dp"
         android:paddingTop="5dp"
         android:paddingEnd="12dp"
         android:paddingBottom="5dp"
         android:text="#배낭여행"
         android:textAlignment="center"
-        android:textColor="@color/C999999"
+        android:textColor="@color/C000000"
         android:textSize="12sp"
         app:layout_constraintEnd_toStartOf="@+id/check_box2"
         app:layout_constraintHorizontal_chainStyle="spread_inside"
@@ -128,7 +128,7 @@
         android:id="@+id/check_box3"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:background="@drawable/custom_rectangle_radio_on"
+        android:background="@drawable/custom_rectangle_radio_off"
         android:lineSpacingExtra="4sp"
         android:paddingStart="12dp"
         android:paddingTop="5dp"
@@ -136,7 +136,7 @@
         android:paddingBottom="5dp"
         android:text="#배낭여행"
         android:textAlignment="center"
-        android:textColor="@color/C000000"
+        android:textColor="@color/C999999"
         android:textSize="12sp"
         app:layout_constraintEnd_toStartOf="@+id/check_box4"
         app:layout_constraintHorizontal_bias="0.5"
@@ -259,9 +259,10 @@
       android:id="@+id/tutorial_bucket_list_tag2"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
-      android:layout_marginStart="131dp"
+      android:layout_marginStart="26dp"
       android:layout_marginTop="151dp"
       android:visibility="gone"
+      app:layout_constraintEnd_toEndOf="parent"
       app:layout_constraintStart_toStartOf="parent"
       app:layout_constraintTop_toTopOf="parent"
       tools:visibility="visible"
@@ -297,7 +298,7 @@
       android:id="@+id/tutorial_bucket_list_tag1"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
-      android:layout_marginStart="131dp"
+      android:layout_marginStart="22dp"
       android:layout_marginTop="10dp"
       app:layout_constraintStart_toStartOf="parent"
       app:layout_constraintTop_toBottomOf="@+id/layout_tag"

+ 1 - 1
app/src/main/res/layout/tutorial_listicle_cover.xml

@@ -11,7 +11,7 @@
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_marginTop="67dp"
-    android:layout_marginEnd="21dp"
+    android:layout_marginEnd="24dp"
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintTop_toTopOf="parent">
 

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -67,6 +67,7 @@
   <string name="tutorial_title_zumo_message">회원가입하고 혜택을 누리세요!</string>
   <string name="tutorial_title_last">내 일상의 플러스</string>
   <string name="tutorial_title_last_message">삶을 더 잘 살기 위한 이야기\n시작해볼까요?</string>
+  <string name="tutorial_bucket_example">연관태그 추천 콘텐츠 <b>31</b>개</string>
 
   <string name="rest_member_message">장기간 이용 내역이 없어 관련 법령에\n따라 휴면상태로 전환되었습니다.</string>
   <string name="rest_member_message_detail">회원님의 계정을 안전하게 보호하기 위해 1년 이상\n로그인하지 않은 계정은 휴면 상태로 전환됩니다.</string>