소스 검색

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

hyodong.min 7 년 전
부모
커밋
505f65c316

+ 15 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsFragment.java

@@ -51,6 +51,8 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
   private View dim;
   private TextView textViewPageNumber;
   private String direction = null;
+  private SnapHelper snapHelper;
+  private boolean isClicked = false;
 
   private RecyclerView.OnScrollListener scrollEventListener;
 
@@ -65,7 +67,7 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
     dim = findViewById(R.id.view_dim_2);
     textViewPageNumber = findViewById(R.id.text_view_page_number);
 
-    SnapHelper snapHelper = new PagerSnapHelper();
+    snapHelper = new PagerSnapHelper();
     snapHelper.attachToRecyclerView(recyclerViewContentsDetail);
 
     TouchEventWithDirection touchEventWithDirection = new TouchEventWithDirection(100);
@@ -86,7 +88,6 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
 
       @Override
       public void onTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
-
       }
 
       @Override
@@ -198,7 +199,6 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
 
   @Override
   public void setSmoothScrollToPosition(int i) {
-
     recyclerViewContentsDetail.smoothScrollToPosition(i);
   }
 
@@ -234,6 +234,18 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
         linearSmoothScroller.setTargetPosition(position);
         startSmoothScroll(linearSmoothScroller);
       }
+
+//      @Override
+//      public void startSmoothScroll(RecyclerView.SmoothScroller smoothScroller) {
+//        int[] out = snapHelper.calculateDistanceToFinalSnap(layoutManager, snapHelper.findSnapView(layoutManager));
+//        if (out[0] == 0 && out[1] == 0) {
+//          Log.e("APP#  ContentsFragment | startSmoothScroll", "|" + " 들어옴  stopscroll");
+//          recyclerViewContentsDetail.stopScroll();
+//          return;
+//        }
+//          super.startSmoothScroll(smoothScroller);
+//
+//      }
     };
     scrollEventListener = new IndexScrollListener(layoutManager, index -> {
       presenter.onChangedPageIndex(index);

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

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+  <item>
+    <shape android:shape="rectangle">
+      <stroke android:color="#e5e5e5" android:width="1dp" />
+      <corners android:radius="8dp"/>
+    </shape>
+  </item>
+</selector>

+ 9 - 6
app/src/main/res/layout/fragment_my_coin_detail.xml

@@ -36,7 +36,7 @@
           android:layout_marginTop="25dp"
           android:layout_marginEnd="30dp"
           android:layout_marginBottom="25dp"
-          android:background="@color/CFFFFFF">
+          android:background="@drawable/coin_border">
 
           <TextView
             android:id="@+id/text_view_coin_detail"
@@ -62,12 +62,15 @@
 
           <ImageView
             android:id="@+id/image_view_coin_information_pop_up"
-            android:layout_width="14dp"
-            android:layout_height="14dp"
-            android:layout_alignTop="@+id/image_view_coin1"
+            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="0dp"
-            android:layout_marginEnd="30dp"
+            android:layout_marginTop="16dp"
+            android:layout_marginEnd="25dp"
+            android:layout_marginBottom="5dp"
+            android:padding="5dp"
             app:srcCompat="@drawable/icon_info_popup_btn"/>
 
           <ImageView