Bladeren bron

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

hyodong.min 7 jaren geleden
bovenliggende
commit
db1e8b7e45

+ 12 - 6
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/GridItemDecoration.java

@@ -21,11 +21,17 @@ public class GridItemDecoration extends RecyclerView.ItemDecoration {
 
   private static final int BANNER_VIEW_TYPE = 1;
   private Context context;
-  private int itemOffset;
+  private int left;
+  private int top;
+  private int right;
+  private int bottom;
 
-  public GridItemDecoration(Context context, int itemOffset) {
+  public GridItemDecoration(Context context, int left, int top, int right, int bottom) {
     this.context = context;
-    this.itemOffset = itemOffset;
+    this.left = left;
+    this.top = top;
+    this.right = right;
+    this.bottom = bottom;
   }
 
   @Override
@@ -37,13 +43,13 @@ public class GridItemDecoration extends RecyclerView.ItemDecoration {
     int itemViewType = parent.getAdapter().getItemViewType(position);
     //배너일때
     if (itemViewType == BANNER_VIEW_TYPE) {
-      outRect.left = itemOffset;
-      outRect.right = itemOffset;
+      outRect.left = this.left;
+      outRect.right = this.right;
       outRect.top = ResourceUtil.dpToPx(18);
       outRect.bottom = ResourceUtil.dpToPx(18);
     }
     else {
-      outRect.set(itemOffset, itemOffset, itemOffset, itemOffset);
+      outRect.set(left, top, right, bottom);
     }
 
   }

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type1/FirstCategoryMainFragment.java

@@ -66,7 +66,7 @@ public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPre
     appBarLayout = findViewById(R.id.app_bar_layout);
     mainSeriesView = findViewById(R.id.series_image_text_view);
     recyclerViewFirstCategoryMain = findViewById(R.id.recycler_view_first_category_main);
-    recyclerViewFirstCategoryMain.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(4)));
+    recyclerViewFirstCategoryMain.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(4),ResourceUtil.dpToPx(4),ResourceUtil.dpToPx(4),ResourceUtil.dpToPx(4)));
     viewFilter = findViewById(R.id.first_category_main_filter);
     spinnerOrder = findViewById(R.id.spinner_select_contents);
     List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));

+ 4 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type3/ThirdCategoryMainFragment.java

@@ -66,7 +66,7 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
     mainSeriesView = findViewById(R.id.series_image_text_view);
 
     recyclerViewThirdCategoryMain = findViewById(R.id.recycler_view_third_category_main);
-    recyclerViewThirdCategoryMain.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(8)));
+    recyclerViewThirdCategoryMain.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(8), ResourceUtil.dpToPx(13), ResourceUtil.dpToPx(8), ResourceUtil.dpToPx(13)));
 
     spinnerOrder = findViewById(R.id.spinner_select_contents);
     List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));
@@ -117,7 +117,7 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
   public void hideRecommendArea() {
     mainSeriesView.setVisibility(View.GONE);
     // TODO: 추후개발 예정
-    recyclerViewThirdCategoryMain.setPadding(0,ResourceUtil.dpToPx(15), 0,0);
+    recyclerViewThirdCategoryMain.setPadding(0, ResourceUtil.dpToPx(10), 0, 0);
   }
 
   @Override
@@ -159,7 +159,8 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
   }
 
   @Override
-  public void drawRecommend(List<CategoryRecommendBean> beans) { ;
+  public void drawRecommend(List<CategoryRecommendBean> beans) {
+    ;
     mainSeriesView.init(getActivity(), beans, beans.size());
     seriesPresenter = new MainSeriesPresenter(mainSeriesView, index -> {
       presenter.onEvent(new Event.Builder(Event.RECOMMEND).index(index).build());

+ 3 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/my/main/MyMainFragment.java

@@ -46,7 +46,6 @@ import kr.co.zumo.app.lifeplus.view.screen.my.bucketlist.MyBucketListBannerPager
 public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> implements IMyMainView {
 
   protected TextView textViewConfirmUser;
-  protected TextView textCoin;
   protected TextView textCoinGuest;
   protected ViewPager viewPagerBestBucketList;
   protected TabLayout tabLayoutBestBucketList;
@@ -56,6 +55,7 @@ public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> imple
   protected ImageView imageViewBookmark2;
   protected TextView textViewBookmark1;
   protected TextView textViewBookmark2;
+  protected TextView textCoin;
 
   protected ConstraintLayout layoutBookmark1;
   protected ConstraintLayout layoutBookmark2;
@@ -88,7 +88,6 @@ public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> imple
   @Override
   protected void onAfterActivityCreated(Bundle savedInstanceState) {
 
-    textCoin = findViewById(R.id.text_view_my_coin);
     textCoinGuest = findViewById(R.id.text_view_guest_coin);
     textViewConfirmUser = findViewById(R.id.text_view_user_confirm);
 
@@ -135,8 +134,10 @@ public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> imple
     // TODO: 2차 오픈: 준비중, 얼랏 처리
     findViewById(R.id.third_layout).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.BANNER).build());});
 
+    textCoin = findViewById(R.id.text_view_my_coin);
     textCoin.setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.MY_COIN_MAIN).build());});
     findViewById(R.id.image_view_my_coin_arrow).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.MY_COIN_MAIN).build());});
+    findViewById(R.id.image_view_coin).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.MY_COIN_MAIN).build());});
 
     findViewById(R.id.text_view_guest_coin).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.MY_COIN_MAIN).build());});
     findViewById(R.id.image_view_guest_coin).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.MY_COIN_MAIN).build());});
@@ -147,7 +148,6 @@ public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> imple
     findViewById(R.id.text_view_coupon).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.COUPON_MALL).build());});
     findViewById(R.id.text_view_event).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.EVENT).build());});
 
-
     textViewConfirmUser.setOnClickListener(view -> { presenter.onEvent(new Event.Builder(Event.SIGN_UP).build());});
     findViewById(R.id.image_view_coupon_mall).setOnClickListener(view -> { presenter.onEvent(new Event.Builder(Event.COUPON_MALL).build());});
 

+ 1 - 0
app/src/main/res/drawable/coin_border.xml

@@ -4,6 +4,7 @@
     <shape android:shape="rectangle">
       <stroke android:color="#e5e5e5" android:width="1dp" />
       <corners android:radius="8dp"/>
+      <solid android:color="@color/CFFFFFF"/>
     </shape>
   </item>
 </selector>

+ 3 - 2
app/src/main/res/layout/dialog_coin_information.xml

@@ -34,8 +34,9 @@
       android:id="@+id/image_view_close"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
-      android:layout_marginStart="127dp"
-      android:layout_marginEnd="32dp"
+      android:layout_marginStart="117dp"
+      android:padding="10dp"
+      android:layout_marginEnd="22dp"
       app:layout_constraintBottom_toBottomOf="@+id/text_view_coin_information"
       app:layout_constraintEnd_toEndOf="parent"
       app:layout_constraintHorizontal_bias="0.5"

+ 46 - 37
app/src/main/res/layout/fragment_my_coin_detail.xml

@@ -29,12 +29,12 @@
         android:background="@color/CF8F8F8"
         >
 
-        <RelativeLayout
-          android:layout_width="wrap_content"
+        <android.support.constraint.ConstraintLayout
+          android:layout_width="match_parent"
           android:layout_height="117dp"
-          android:layout_marginStart="30dp"
+          android:layout_marginStart="25dp"
           android:layout_marginTop="25dp"
-          android:layout_marginEnd="30dp"
+          android:layout_marginEnd="25dp"
           android:layout_marginBottom="25dp"
           android:background="@drawable/coin_border">
 
@@ -44,93 +44,102 @@
             android:layout_height="wrap_content"
             android:layout_marginStart="30dp"
             android:layout_marginTop="20dp"
+            android:layout_marginBottom="11dp"
             android:lineSpacingExtra="10sp"
             android:textColor="@color/C000000"
             android:textSize="25sp"
+            app:layout_constraintBottom_toTopOf="@+id/divider"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+
             tools:text="6,900"
             />
 
           <ImageView
             android:id="@+id/image_view_coin1"
-            android:layout_width="14dp"
-            android:layout_height="14dp"
-            android:layout_alignParentTop="true"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
             android:layout_marginStart="3dp"
-            android:layout_marginTop="31dp"
-            android:layout_toRightOf="@+id/text_view_coin_detail"
+            app:layout_constraintBottom_toBottomOf="@+id/text_view_coin_detail"
+            app:layout_constraintStart_toEndOf="@+id/text_view_coin_detail"
+            app:layout_constraintTop_toTopOf="@+id/text_view_coin_detail"
             app:srcCompat="@drawable/icon_coin"/>
 
           <ImageView
             android:id="@+id/image_view_coin_information_pop_up"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_above="@+id/divider"
-            android:layout_alignParentTop="true"
-            android:layout_alignParentEnd="true"
-            android:layout_marginTop="16dp"
-            android:layout_marginEnd="25dp"
-            android:layout_marginBottom="5dp"
-            android:padding="5dp"
+            android:layout_marginTop="21dp"
+            android:layout_marginEnd="20dp"
+            android:padding="10dp"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
             app:srcCompat="@drawable/icon_info_popup_btn"/>
 
           <ImageView
             android:id="@+id/image_view_coin"
             android:layout_width="14dp"
             android:layout_height="14dp"
-            android:layout_below="@+id/divider"
-            android:layout_alignParentEnd="true"
-            android:layout_marginTop="19dp"
             android:layout_marginEnd="30dp"
-
+            app:layout_constraintBottom_toBottomOf="@+id/text_expiring_coin"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/text_expiring_coin"
             app:srcCompat="@drawable/icon_coin"/>
 
           <View
             android:id="@+id/divider"
             android:layout_width="match_parent"
             android:layout_height="1dp"
-            android:layout_alignParentStart="true"
-            android:layout_centerVertical="true"
             android:layout_marginStart="30dp"
+            android:layout_marginTop="65dp"
             android:layout_marginEnd="30dp"
-            android:background="@color/CE5E5E5"/>
+            android:background="@color/CE5E5E5"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent"/>
 
           <TextView
             android:id="@+id/text_view_extinct_coin"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignStart="@+id/text_view_coin_detail"
-            android:layout_alignParentBottom="true"
-            android:layout_marginStart="1dp"
-            android:layout_marginBottom="19dp"
-            android:lineSpacingExtra="4sp"
+            android:layout_marginStart="20dp"
+            android:layout_marginTop="9dp"
+            android:layout_marginBottom="8dp"
+            android:paddingStart="10dp"
+            android:paddingTop="10dp"
+            android:paddingBottom="10dp"
             android:text="당월 소멸예정코인"
             android:textColor="@color/C666666"
-            android:textSize="12sp"/>
+            android:textSize="12sp"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/divider"/>
 
           <ImageView
             android:id="@+id/image_view_extinct_coin_arrow"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentTop="true"
             android:layout_marginStart="2dp"
-            android:layout_marginLeft="48dp"
-            android:layout_marginTop="86dp"
-            android:layout_toRightOf="@+id/text_view_extinct_coin"
+            android:paddingTop="10dp"
+            android:paddingBottom="10dp"
+            app:layout_constraintBottom_toBottomOf="@id/text_view_extinct_coin"
+            app:layout_constraintStart_toEndOf="@id/text_view_extinct_coin"
+            app:layout_constraintTop_toTopOf="@+id/text_view_extinct_coin"
             app:srcCompat="@drawable/icon_detail_arrow"/>
 
           <TextView
             android:id="@+id/text_expiring_coin"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_below="@+id/divider"
-            android:layout_marginTop="15dp"
             android:layout_marginEnd="3dp"
-            android:layout_toLeftOf="@+id/image_view_coin"
             android:lineSpacingExtra="6sp"
             android:textColor="@color/C000000"
             android:textSize="16sp"
+            app:layout_constraintBottom_toBottomOf="@+id/image_view_extinct_coin_arrow"
+            app:layout_constraintEnd_toStartOf="@+id/image_view_coin"
+            app:layout_constraintTop_toTopOf="@+id/image_view_extinct_coin_arrow"
             tools:text="-410"/>
-        </RelativeLayout>
+        </android.support.constraint.ConstraintLayout>
       </LinearLayout>
 
       <!--<android.support.v7.widget.Toolbar-->

+ 13 - 9
app/src/main/res/layout/fragment_my_coin_main.xml

@@ -28,7 +28,7 @@
         android:layout_marginTop="25dp"
         android:layout_marginEnd="30dp"
         android:layout_marginBottom="25dp"
-        android:background="@drawable/rectangle_border_ce5e5e5"
+        android:background="@drawable/coin_border"
         app:layout_constraintBottom_toBottomOf="@+id/layout_container_my_coin"
         app:layout_constraintEnd_toEndOf="@+id/layout_container_my_coin"
         app:layout_constraintStart_toStartOf="@+id/layout_container_my_coin"
@@ -70,13 +70,16 @@
         <TextView
           android:id="@+id/text_view_my_coin_detail"
           android:layout_width="wrap_content"
-          android:layout_height="20dp"
+          android:layout_height="wrap_content"
           android:layout_marginTop="30dp"
           android:layout_marginEnd="2dp"
           android:layout_marginBottom="30dp"
           android:gravity="end"
           android:lineSpacingExtra="4sp"
           android:text="@string/my_coin_detail_go"
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
+          android:paddingStart="10dp"
           android:textColor="@color/C666666"
           android:textSize="12sp"
           app:layout_constraintBottom_toBottomOf="parent"
@@ -85,14 +88,15 @@
 
         <ImageView
           android:id="@+id/image_view_arrow_my_colin_detail"
-          android:layout_width="14dp"
-          android:layout_height="14dp"
-          android:layout_marginTop="8dp"
-          android:layout_marginEnd="29dp"
-          android:layout_marginBottom="8dp"
-          app:layout_constraintBottom_toBottomOf="parent"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginEnd="19dp"
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
+          android:paddingEnd="10dp"
+          app:layout_constraintBottom_toBottomOf="@+id/text_view_my_coin_detail"
           app:layout_constraintEnd_toEndOf="@+id/layout_my_coin"
-          app:layout_constraintTop_toTopOf="parent"
+          app:layout_constraintTop_toTopOf="@+id/text_view_my_coin_detail"
           app:srcCompat="@drawable/icon_arrow_coin"/>
       </android.support.constraint.ConstraintLayout>
     </android.support.constraint.ConstraintLayout>

+ 49 - 24
app/src/main/res/layout/fragment_my_main.xml

@@ -16,49 +16,61 @@
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:layout_marginBottom="16dp"
+      android:layout_marginTop="18dp"
       android:visibility="gone"
-      app:layout_constraintBottom_toTopOf="@+id/divider">
+      app:layout_constraintTop_toTopOf="parent"
+      app:layout_constraintBottom_toTopOf="@+id/divider"
+      tools:visibility="visible">
 
       <TextView
         android:id="@+id/text_view_my_coin"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="18dp"
+        android:includeFontPadding="false"
         android:lineSpacingExtra="8sp"
         android:textColor="@color/C000000"
         android:textSize="21sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintHorizontal_chainStyle="packed"
+        app:layout_constraintEnd_toStartOf="@+id/image_view_coin"
+        app:layout_constraintHorizontal_bias="0.5"
+        app:layout_constraintStart_toStartOf="parent"
         tools:text="@string/my_coin_detail"/>
 
       <ImageView
         android:id="@+id/image_view_coin"
-        android:layout_width="14dp"
-        android:layout_height="14dp"
-        android:layout_marginStart="3dp"
-        android:layout_marginTop="26dp"
-        android:scaleType="fitXY"
-        app:layout_constraintStart_toEndOf="@id/text_view_my_coin"
-        app:layout_constraintTop_toTopOf="parent"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingStart="3dp"
+        android:paddingTop="10dp"
+        android:paddingBottom="10dp"
+        app:layout_constraintTop_toTopOf="@+id/text_view_my_coin"
+        app:layout_constraintBottom_toBottomOf="@+id/text_view_my_coin"
+        app:layout_constraintEnd_toStartOf="@+id/image_view_my_coin_arrow"
+        app:layout_constraintHorizontal_bias="0.5"
+        app:layout_constraintHorizontal_chainStyle="packed"
+        app:layout_constraintStart_toEndOf="@+id/text_view_my_coin"
         app:srcCompat="@drawable/icon_coin"/>
 
       <ImageView
         android:id="@+id/image_view_my_coin_arrow"
-        android:layout_width="11dp"
-        android:layout_height="11dp"
-        android:layout_marginStart="3dp"
-        android:layout_marginTop="27dp"
-        android:scaleType="fitXY"
-        app:layout_constraintStart_toEndOf="@id/image_view_coin"
-        app:layout_constraintTop_toTopOf="parent"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingTop="10dp"
+        android:paddingEnd="3dp"
+        android:paddingBottom="10dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintHorizontal_bias="0.5"
+        app:layout_constraintTop_toTopOf="@+id/image_view_coin"
+        app:layout_constraintBottom_toBottomOf="@+id/image_view_coin"
+        app:layout_constraintStart_toEndOf="@+id/image_view_coin"
         app:srcCompat="@drawable/icon_detail_arrow"/>
 
       <android.support.constraint.ConstraintLayout
         android:id="@+id/first_layout2"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="33dp"
+        android:layout_marginTop="23dp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/text_view_my_coin">
@@ -69,6 +81,8 @@
           android:layout_height="wrap_content"
           android:layout_marginEnd="4dp"
           android:lineSpacingExtra="4sp"
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
           android:text="@string/having_coupon"
           android:textColor="@color/C999999"
           android:textSize="12sp"
@@ -80,8 +94,11 @@
           android:id="@+id/text_view_coupon_count"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
-          android:layout_marginEnd="26dp"
+          android:layout_marginEnd="21dp"
           android:lineSpacingExtra="4sp"
+
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
           android:text="@string/eight"
           android:textColor="@color/C000000"
           android:textSize="12sp"
@@ -107,6 +124,8 @@
           android:layout_height="wrap_content"
           android:layout_marginEnd="4dp"
           android:lineSpacingExtra="4sp"
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
           android:text="@string/buy_and_reserve"
           android:textColor="@color/C999999"
           android:textSize="12sp"
@@ -120,6 +139,8 @@
           android:layout_height="wrap_content"
           android:layout_marginEnd="23dp"
           android:lineSpacingExtra="4sp"
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
           android:text="@string/eight"
           android:textColor="@color/C000000"
           android:textSize="12sp"
@@ -145,6 +166,8 @@
           android:layout_height="wrap_content"
           android:layout_marginEnd="4dp"
           android:lineSpacingExtra="4sp"
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
           android:text="@string/menu_category2"
           android:textColor="@color/C999999"
           android:textSize="12sp"
@@ -157,6 +180,8 @@
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:lineSpacingExtra="4sp"
+          android:paddingTop="10dp"
+          android:paddingBottom="10dp"
           android:text="@string/three"
           android:textColor="@color/C000000"
           android:textSize="12sp"
@@ -253,13 +278,13 @@
       android:layout_width="match_parent"
       android:layout_height="1dp"
       android:layout_marginStart="25dp"
-      android:layout_marginTop="16dp"
+      android:layout_marginTop="6dp"
       android:layout_marginEnd="25dp"
       android:background="@color/CE5E5E5"
-      android:visibility="gone"
       app:layout_constraintBottom_toTopOf="@+id/third_layout"
-      app:layout_constraintEnd_toEndOf="@+id/second_layout"
-      app:layout_constraintStart_toStartOf="@+id/second_layout"/>
+      app:layout_constraintStart_toStartOf="parent"
+
+      app:layout_constraintEnd_toEndOf="parent"/>
 
     <android.support.constraint.ConstraintLayout
       android:id="@+id/third_layout"