瀏覽代碼

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

hyodong.min 7 年之前
父節點
當前提交
5a71d5341f
共有 20 個文件被更改,包括 105 次插入33 次删除
  1. 1 1
      app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/category/banner/MainBannerView.java
  2. 23 7
      app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/category/banner/MainBannerViewItemDotIndicator.java
  3. 4 0
      app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsDetailAdapter.java
  4. 2 0
      app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsDetailWithShownViewHolder.java
  5. 2 3
      app/src/main/res/drawable/rectangle_dim_c80cccccc.xml
  6. 0 0
      app/src/main/res/drawable/rectangle_dim_black_5.xml
  7. 9 0
      app/src/main/res/drawable/rectangle_dim_black_50_gradation.xml
  8. 9 0
      app/src/main/res/drawable/rectangle_dim_black_60_gradation.xml
  9. 1 1
      app/src/main/res/layout/contents_detail_with_shown.xml
  10. 7 0
      app/src/main/res/layout/contents_detail_with_shown_item_view.xml
  11. 1 1
      app/src/main/res/layout/contents_listicle_cover.xml
  12. 25 1
      app/src/main/res/layout/custom_listicle_image_view_item.xml
  13. 1 1
      app/src/main/res/layout/fragment_add_my_bucket_list.xml
  14. 1 1
      app/src/main/res/layout/fragment_bucket_list_default_detail.xml
  15. 1 1
      app/src/main/res/layout/fragment_bucket_list_with_tag_detail.xml
  16. 1 1
      app/src/main/res/layout/main_contents_category_image.xml
  17. 6 5
      app/src/main/res/layout/main_first_category_banner_view.xml
  18. 5 5
      app/src/main/res/layout/main_fourth_category_banner_view.xml
  19. 5 5
      app/src/main/res/layout/main_third_category_banner_view.xml
  20. 1 0
      app/src/main/res/values/colors.xml

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

@@ -62,7 +62,7 @@ public class MainBannerView extends ConstraintLayout {
     snapHelper.attachToRecyclerView(recyclerView);
     recyclerView.setAdapter(mainBannerAdapter);
 
-    recyclerView.addItemDecoration(new MainBannerViewItemDotIndicator());
+    recyclerView.addItemDecoration(new MainBannerViewItemDotIndicator(getContext(), R.color.C4DFFFFFF, R.color.CFFFFFF, 0));
 
   }
 

+ 23 - 7
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/category/banner/MainBannerViewItemDotIndicator.java

@@ -4,8 +4,12 @@ import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Canvas;
 import android.graphics.Paint;
+import android.graphics.Rect;
+import android.support.annotation.ColorRes;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.View;
 
 /**
  * MainBannerViewItemDotIndicator
@@ -20,14 +24,16 @@ import android.support.v7.widget.RecyclerView;
 public class MainBannerViewItemDotIndicator extends RecyclerView.ItemDecoration {
 
   private Context context;
-  private int colorActive = 0xFFFFFFFF;
-  private int colorInactive = 0x4DFFFFFF;
+  private int activeColor;
+  private int inActiveColor;
+  private int bottomOffset;
+
   private static final float DP = Resources.getSystem().getDisplayMetrics().density;
 
   /**
    * Height of the space the indicator takes up at the bottom of the view.
    */
-  private final int mIndicatorHeight = (int) (DP * 16);
+  private final int mIndicatorHeight = (int) (DP * 16 );
 
   /**
    * Indicator stroke width.
@@ -50,8 +56,12 @@ public class MainBannerViewItemDotIndicator extends RecyclerView.ItemDecoration
 
   private final Paint mPaint = new Paint();
 
-  public MainBannerViewItemDotIndicator() {
-    //this.context = context;
+  public MainBannerViewItemDotIndicator(Context context, @ColorRes int inActiveColor, @ColorRes int activeColor, int bottomOffest) {
+    this.context = context;
+    this.inActiveColor = inActiveColor;
+    this.activeColor = activeColor;
+    this.bottomOffset = bottomOffest;
+
     mPaint.setStrokeCap(Paint.Cap.ROUND);
     mPaint.setStrokeWidth(mIndicatorStrokeWidth);
     mPaint.setStyle(Paint.Style.FILL);
@@ -90,7 +100,7 @@ public class MainBannerViewItemDotIndicator extends RecyclerView.ItemDecoration
   }
 
   private void drawInactiveIndicators(Canvas c, float indicatorStartX, float indicatorPosY, int itemCount) {
-    mPaint.setColor(colorInactive);
+    mPaint.setColor(context.getResources().getColor(inActiveColor));
 
     // width of item indicator including padding
     final float itemWidth = mIndicatorItemLength + mIndicatorItemPadding;
@@ -107,7 +117,7 @@ public class MainBannerViewItemDotIndicator extends RecyclerView.ItemDecoration
 
   private void drawHighlights(Canvas canvas, float indicatorStartX, float indicatorPosY,
                               int highlightPosition, int itemCount) {
-    mPaint.setColor(colorActive);
+    mPaint.setColor(context.getResources().getColor(activeColor));
 
     // width of item indicator including padding
     final float itemWidth = mIndicatorItemLength + mIndicatorItemPadding;
@@ -121,4 +131,10 @@ public class MainBannerViewItemDotIndicator extends RecyclerView.ItemDecoration
     }
 
   }
+
+  @Override
+  public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
+    Log.e("APP#  MainBannerViewItemDotIndicator | getItemOffsets", "| bottomOffset" + bottomOffset);
+    outRect.bottom = bottomOffset;
+  }
 }

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

@@ -30,6 +30,10 @@ public class ContentsDetailAdapter extends RecyclerView.Adapter<ContentsDetailVi
   private static final int LISTICLE_DETAIL = 1;
   private static final int SERIES = 2;
   private static final int WITH_SHOWN_CONTENTS = 3;
+  private static final int CARD_LISTILCE_COVER= 4;
+  private static final int CARD_DETAIL = 5;
+  private static final int CARD_LISTICLE_DETAIL= 5;
+
 
   public ContentsDetailAdapter(Context context, IEventListener listener) {
     this.context = context;

+ 2 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsDetailWithShownViewHolder.java

@@ -11,6 +11,7 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.IEventListener;
 import kr.co.zumo.app.lifeplus.view.custom.Snapper;
+import kr.co.zumo.app.lifeplus.view.custom.category.banner.MainBannerViewItemDotIndicator;
 
 /**
  * ContentsDetailWithShownViewHolder
@@ -81,5 +82,6 @@ public class ContentsDetailWithShownViewHolder extends ContentsDetailView {
 
       }
     });
+    recyclerViewWithShownContents.addItemDecoration(new MainBannerViewItemDotIndicator(itemView.getContext(), R.color.C19000000, R.color.C000000, ResourceUtil.dpToPx(74)));
   }
 }

+ 2 - 3
app/src/main/res/drawable/rectangle_dim_c80cccccc.xml

@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-       android:shape="rectangle">
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
 
-  <solid android:color="#80000000"/>
+  <solid android:color="#33000000"/>
   <corners
     android:radius="0dp"/>
 </shape>

app/src/main/res/drawable/rectangle_dim_main_1.xml → app/src/main/res/drawable/rectangle_dim_black_5.xml


+ 9 - 0
app/src/main/res/drawable/rectangle_dim_black_50_gradation.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+<gradient
+  android:angle="90"
+  android:endColor="#00000000"
+  android:startColor="#80000000"
+  android:type="linear" />
+</shape>

+ 9 - 0
app/src/main/res/drawable/rectangle_dim_black_60_gradation.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+  <gradient
+    android:angle="90"
+    android:endColor="#00000000"
+    android:startColor="#99000000"
+    android:type="linear" />
+</shape>

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

@@ -37,7 +37,7 @@
   <android.support.v7.widget.RecyclerView
     android:id="@+id/recycler_view_with_shown_contents"
     android:layout_width="match_parent"
-    android:layout_height="311dp"
+    android:layout_height="385dp"
     android:layout_marginTop="35dp"
     android:clipToPadding="false"
     android:paddingStart="19dp"

+ 7 - 0
app/src/main/res/layout/contents_detail_with_shown_item_view.xml

@@ -14,6 +14,13 @@
     android:src="@drawable/mymain_bucket_banner_3"
     />
 
+  <View
+    android:layout_width="match_parent"
+    android:layout_height="156dp"
+    android:background="@drawable/rectangle_dim_black_60_gradation"
+    app:layout_constraintBottom_toBottomOf="parent"
+    />
+
   <TextView
     android:id="@+id/text_view_sub_title"
     android:layout_width="wrap_content"

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

@@ -21,7 +21,7 @@
   <View
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/rectangle_dim_c80cccccc"
+    android:background="@drawable/rectangle_dim_black_50_gradation"
     app:layout_constraintBottom_toBottomOf="parent"
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"

+ 25 - 1
app/src/main/res/layout/custom_listicle_image_view_item.xml

@@ -6,11 +6,35 @@
   android:layout_width="match_parent"
   android:layout_height="match_parent">
 
+
   <ImageView
     android:id="@+id/image_view_background"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:scaleType="centerCrop"
-    android:src="@color/C666666"/>
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent"
+    tools:src="@drawable/banner_bg_1"/>
+
+  <View
+    android:id="@+id/top_dim"
+    android:layout_width="match_parent"
+    android:layout_height="0dp"
+    android:background="@drawable/rectangle_dim_black_20"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent"/>
 
+  <View
+    android:id="@+id/dim"
+    android:layout_width="match_parent"
+    android:layout_height="183dp"
+    android:background="@drawable/rectangle_dim_black_50_gradation"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    />
 </android.support.constraint.ConstraintLayout>

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

@@ -16,7 +16,7 @@
   <View
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/rectangle_dim_c80cccccc"/>
+    android:background="@drawable/rectangle_dim_black_50_gradation"/>
 
   <EditText
     android:id="@+id/edit_text_my_bucket"

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

@@ -23,7 +23,7 @@
   <ImageView
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:src="@drawable/rectangle_dim_c80cccccc"
+    android:src="@drawable/rectangle_dim_black_50_gradation"
     app:layout_constraintTop_toTopOf="@+id/image_view_bucket_background"
     />
 

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

@@ -58,7 +58,7 @@
           android:layout_width="match_parent"
           android:layout_height="208dp"
           android:scaleType="centerCrop"
-          android:src="@drawable/rectangle_dim_c80cccccc"
+          android:src="@drawable/rectangle_dim_black_50_gradation"
           app:layout_collapseMode="parallax"/>
 
         <android.support.constraint.ConstraintLayout

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

@@ -20,7 +20,7 @@
     android:id="@+id/mask_0"
     android:layout_width="@dimen/main_contents_image_width"
     android:layout_height="@dimen/main_contents_image_height"
-    android:background="@drawable/rectangle_dim_main_1"/>
+    android:background="@drawable/rectangle_dim_black_5"/>
 
   <View
     android:id="@+id/mask_1"

+ 6 - 5
app/src/main/res/layout/main_first_category_banner_view.xml

@@ -4,14 +4,15 @@
   android:layout_width="match_parent"
   android:layout_height="wrap_content">
 
-  <View
-    android:layout_width="match_parent"
-    android:layout_height="122dp"
-    android:background="@drawable/rectangle_dim_c80cccccc"
-    />
+
 <kr.co.zumo.app.lifeplus.view.custom.category.banner.MainBannerView
   android:id="@+id/main_banner_view_first_category"
   android:layout_width="match_parent"
   android:layout_height="122dp"/>
+  <View
+    android:layout_width="match_parent"
+    android:layout_height="122dp"
+    android:background="@drawable/rectangle_dim_black_50_gradation"
+    />
 
 </android.support.constraint.ConstraintLayout>

+ 5 - 5
app/src/main/res/layout/main_fourth_category_banner_view.xml

@@ -4,13 +4,13 @@
   android:layout_width="match_parent"
   android:layout_height="wrap_content">
 
-  <View
-    android:layout_width="match_parent"
-    android:layout_height="150dp"
-    android:background="@drawable/rectangle_dim_c80cccccc"/>
+
   <kr.co.zumo.app.lifeplus.view.custom.category.banner.MainBannerView
     android:id="@+id/main_banner_view_first_category"
     android:layout_width="match_parent"
     android:layout_height="150dp"/>
-
+  <View
+    android:layout_width="match_parent"
+    android:layout_height="150dp"
+    android:background="@drawable/rectangle_dim_black_50_gradation"/>
 </android.support.constraint.ConstraintLayout>

+ 5 - 5
app/src/main/res/layout/main_third_category_banner_view.xml

@@ -4,13 +4,13 @@
   android:layout_width="match_parent"
   android:layout_height="wrap_content">
 
-  <View
-    android:layout_width="match_parent"
-    android:layout_height="150dp"
-    android:background="@drawable/rectangle_dim_c80cccccc"/>
+
   <kr.co.zumo.app.lifeplus.view.custom.category.banner.MainBannerView
     android:id="@+id/main_banner_view_first_category"
     android:layout_width="match_parent"
     android:layout_height="150dp"/>
-
+  <View
+    android:layout_width="match_parent"
+    android:layout_height="150dp"
+    android:background="@drawable/rectangle_dim_black_50_gradation"/>
 </android.support.constraint.ConstraintLayout>

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

@@ -7,6 +7,7 @@
   <color name="CFFFFFF">#FFFFFF</color>
   <color name="C80FFFFFF">#80FFFFFF</color> <!-- 50% -->
   <color name="C000000">#000000</color>
+  <color name="C19000000">#19000000</color>
   <!--opacity 40%-->
   <color name="C66000000">#66000000</color>
   <color name="C66FFFFFF">#66FFFFFF</color>