瀏覽代碼

[공통][Common] 코드 Analysis 수정사항 반영 중

Hasemi 6 年之前
父節點
當前提交
dcb31f6bd6

+ 0 - 72
app/src/main/java/kr/co/zumo/app/lifeplus/view/CustomRecyclerView.java

@@ -1,72 +0,0 @@
-/*
- * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
- */
-package kr.co.zumo.app.lifeplus.view;
-
-import android.content.Context;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.RecyclerView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.MotionEvent;
-
-/**
- * CustomRecyclerView
- * <pre>
- * </pre>
- *
- * @author 민효동
- * @version 1.0
- * @history 민효동   [2018-10-31]   [최초 작성]
- * @since 2018-10-31
- */
-public class CustomRecyclerView extends RecyclerView {
-  public CustomRecyclerView(Context context) {
-    super(context);
-  }
-
-  public CustomRecyclerView(Context context, @Nullable AttributeSet attrs) {
-    super(context, attrs);
-  }
-
-  public CustomRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
-    super(context, attrs, defStyle);
-  }
-
-  @Override
-  public boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow, int type) {
-    boolean result = false;
-    result = super.dispatchNestedPreScroll(dx, dy, consumed, offsetInWindow, type);
-    if(null != consumed && null != offsetInWindow) {
-//      Log.i("APP# CustomRecyclerView | dispatchNestedPreScroll", "| dy: " + dy + ", consumed y: " + consumed[1] + ", offsetInWindow: " + offsetInWindow[1]);
-    }
-    return false;
-  }
-
-  @Override
-  public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow, int type) {
-    boolean result = false;
-    result = super.dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, offsetInWindow, type);
-    if(null != offsetInWindow) {
-//      Log.i("APP# CustomRecyclerView | dispatchNestedScroll", "| dyConsumed: " + dyConsumed + ", dyUnconsumed: " + dyUnconsumed + ", offsetInWindow: " + offsetInWindow[1]);
-    }
-    return result;
-  }
-
-  @Override
-  public boolean onInterceptTouchEvent(MotionEvent e) {
-    Log.i("APP# CustomRecyclerView | onInterceptTouchEvent", "|------------------------" + e.toString());
-    /**
-     * 스크롤이 누락되는 원인
-     * - 일반 view holder 에서는 onInterceptTouchEvent(ACTION_MOVE) 가 실행되지 않는다.
-     * - recycler view holder 에서는 onInterceptTouchEvent(ACTION_MOVE) 가 작동되어 onTouchEvent() 의 ACTION_MOVE 가 작동된다.
-     */
-    return super.onInterceptTouchEvent(e);
-  }
-
-  @Override
-  public boolean onTouchEvent(MotionEvent e) {
-    Log.i("APP# CustomRecyclerView | onTouchEvent", "|" + e.toString());
-    return super.onTouchEvent(e);
-  }
-}

+ 2 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/FrameAnimation.java

@@ -348,7 +348,7 @@ public class FrameAnimation {
      * @param durations durations
      */
     public FrameAnimation.Builder durations(int[] durations) {
-      this.mDurations = durations;
+      this.mDurations = durations.clone();
       return this;
     }
 
@@ -356,7 +356,7 @@ public class FrameAnimation {
      * @param frameRess frame resources
      */
     public FrameAnimation.Builder resources(int[] frameRess) {
-      this.mFrameResources = frameRess;
+      this.mFrameResources = frameRess.clone();
       this.mLastFrame = frameRess.length - 1;
       return this;
     }

+ 6 - 7
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/Tutorial.java

@@ -11,7 +11,6 @@ import android.widget.FrameLayout;
 import android.widget.ImageView;
 
 import kr.co.zumo.app.R;
-import kr.co.zumo.app.lifeplus.util.AppUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.IEventListener;
 
@@ -113,10 +112,10 @@ public class Tutorial {
      * API 23이하 버전 실행시 레이아웃 조정
      * API 19 기기 테스트 결과 레이아웃에 잘 반영되지않아 주석처리
      */
-    if (false == AppUtil.isFullScreenVersion()) {
+//    if (false == AppUtil.isFullScreenVersion()) {
 //      ConstraintLayout.LayoutParams bubble1Params = (ConstraintLayout.LayoutParams) bubble1.getLayoutParams();
 //      bubble1Params.setMargins(bubble1Params.leftMargin, bubble1Params.topMargin - ResourceUtil.getStatusBarHeight(), bubble1Params.rightMargin, bubble1Params.bottomMargin);
-    }
+//    }
 
     bubble1.setLayerType(View.LAYER_TYPE_HARDWARE, null);
     ObjectAnimator firstTutorial = fadeOut(bubble1);
@@ -162,13 +161,13 @@ public class Tutorial {
      * API 23이하 버전 실행시 레이아웃 조정
      * API 19 기기 테스트 결과 레이아웃에 잘 반영되지않아 주석처리
      */
-    if (false == AppUtil.isFullScreenVersion()) {
+//    if (false == AppUtil.isFullScreenVersion()) {
 //      ConstraintLayout.LayoutParams bubble1Params = (ConstraintLayout.LayoutParams) bubble1.getLayoutParams();
 //      bubble1Params.setMargins(bubble1Params.leftMargin, bubble1Params.topMargin - ResourceUtil.getStatusBarHeight(), bubble1Params.rightMargin, bubble1Params.bottomMargin);
 //
 //      ConstraintLayout.LayoutParams bubble2Params = (ConstraintLayout.LayoutParams) bubble2.getLayoutParams();
 //      bubble2Params.setMargins(bubble2Params.leftMargin, bubble2Params.topMargin - ResourceUtil.getStatusBarHeight(), bubble2Params.rightMargin, bubble2Params.bottomMargin);
-    }
+//   }
 
     bubble1.setLayerType(View.LAYER_TYPE_HARDWARE, null);
     ObjectAnimator firstTutorial = fadeOut(bubble1);
@@ -219,13 +218,13 @@ public class Tutorial {
      * API 23이하 버전 실행시 레이아웃 조정
      * API 19 기기 테스트 결과 레이아웃에 잘 반영되지않아 주석처리
      */
-    if (false == AppUtil.isFullScreenVersion()) {
+//    if (false == AppUtil.isFullScreenVersion()) {
 //      ConstraintLayout.LayoutParams params1 = (ConstraintLayout.LayoutParams) trashIcon1.getLayoutParams();
 //      params1.setMargins(params1.leftMargin, params1.topMargin - ResourceUtil.getStatusBarHeight(), params1.rightMargin, params1.bottomMargin);
 //
 //      ConstraintLayout.LayoutParams params2 = (ConstraintLayout.LayoutParams) trashIcon2.getLayoutParams();
 //      params2.setMargins(params2.leftMargin, params2.topMargin - ResourceUtil.getStatusBarHeight(), params2.rightMargin, params2.bottomMargin);
-    }
+//    }
 
     frameLayout.addView(firstView);
     firstView.setClickable(true);

+ 3 - 5
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/auth/MobileAuthPresenter.java

@@ -317,9 +317,7 @@ public class MobileAuthPresenter implements IMobileAuthContract.Presenter {
    * @param isFocusChanged
    */
   public void onFocusValidationNumberText(boolean isFocusChanged) {
-    if (isFocusChanged) {
-    }
-    else {
+    if (false == isFocusChanged) {
       // 떠날 때 유효성 체크
       verifyAuthorizationNumber(this.authorizationNumber);
     }
@@ -374,7 +372,7 @@ public class MobileAuthPresenter implements IMobileAuthContract.Presenter {
             if (resultBean.getCode() == LifeplusAPIBean.RETURN_MOBILE_AUTH_ERROR_NEED_FOR_30_DAYS
               || resultBean.getCode() == LifeplusAPIBean.RETURN_MOBILE_AUTH_ERROR_UNDER_14_YEARS
               || resultBean.getCode() == LifeplusAPIBean.RETURN_MOBILE_AUTH_ERROR_ALREADY_MEMBER
-            ) {
+              ) {
               // 성공
               doSomeWhenConfirmSuccess(resultBean);
             }
@@ -871,7 +869,7 @@ public class MobileAuthPresenter implements IMobileAuthContract.Presenter {
       len <= 7
         || birthDate.matches("^[012].+") == false
         || len > 8
-    ) {
+      ) {
       //숫자 7자리 이하 입력시, or YYYY 으로 시작 하지 않았을 경우;
       Log.i("APP# MobileAuthPresenter | verifyBirthDate", "|" + "birthDateLength check");
       if (isDisplay) {

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/category/series/MainSeriesView.java

@@ -18,7 +18,7 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import me.everything.android.ui.overscroll.OverScrollDecoratorHelper;
 
 /**
- * CustomRecyclerView
+ * MainSeriesView
  * <pre>
  * </pre>
  *

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/faq/FAQPagerAdapter.java

@@ -29,7 +29,7 @@ public class FAQPagerAdapter extends FragmentStatePagerAdapter implements FAQLis
   public FAQPagerAdapter(FragmentManager fm, String[] tabs, List<FAQBean> beans) {
     super(fm);
 
-    this.tabs = tabs;
+    this.tabs = tabs.clone();
     this.faqBeans = beans;
 
   }

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/introduction/LifeplusIntroductionPagerAdapter.java

@@ -30,7 +30,7 @@ public class LifeplusIntroductionPagerAdapter extends FragmentStatePagerAdapter
   public LifeplusIntroductionPagerAdapter(FragmentManager fm, IEventListener listener, String[] tabs) {
     super(fm);
     this.listener = listener;
-    this.tabs = tabs;
+    this.tabs = tabs.clone();
   }
 
   @Override

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/notification/NotiPagerAdapter.java

@@ -33,7 +33,7 @@ public class NotiPagerAdapter extends FragmentStatePagerAdapter implements NotiL
 
   public NotiPagerAdapter(FragmentManager fm, String[] tabs, List<NoticeBean> noticeBeans, IEventListener listener) {
     super(fm);
-    this.tabs = tabs;
+    this.tabs = tabs.clone();
     this.noticeBeans = noticeBeans;
     this.listener = listener;
   }

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

@@ -712,7 +712,7 @@
   <string name="three">3</string>
   <string name="buy_and_reserve">구매/예약</string>
   <string name="life_plus_benefit_text"><b>%s 위한 Lifeplus</b></string>
-  <string name="my_main_banner_sub_title_for_guest">Lifeplus 회원이 좋아하는 콘텐츠 추천!</string>
+  <string name="my_main_banner_sub_title_for_guest">Lifeplus 회원이 좋아하는 콘텐츠 추천</string>
   <string name="book_mark_count">북마크 %s</string>
   <string name="bucket_list_count">버킷리스트 %s</string>
   <string name="book_mark_recommend_text">최근 많이 북마크한 콘텐츠 추천</string>