Forráskód Böngészése

[마이][Bug] 버킷리스트 등록시 이미지 리스트 흰색 테두리 잘림현상 수정

Hasemi 6 éve
szülő
commit
62728081cc

+ 8 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/my/bucketlist/AddMyBucketListFragment.java

@@ -1,6 +1,7 @@
 package kr.co.zumo.app.lifeplus.view.screen.my.bucketlist;
 
 import android.content.Context;
+import android.graphics.Rect;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -183,6 +184,13 @@ public class AddMyBucketListFragment extends FragmentBase<AddMyBucketListPresent
     addMyBucketListAdapter = new AddMyBucketListAdapter(getActivity(), myBucketListData, selectedIndex, index -> {
       presenter.onEvent(new Event.Builder(Event.CLICK).index(index).build());
     });
+    recyclerViewImageList.addItemDecoration(new RecyclerView.ItemDecoration() {
+      @Override
+      public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
+        outRect.right = ResourceUtil.dpToPx(6);
+        outRect.left = ResourceUtil.dpToPx(6);
+      }
+    });
     recyclerViewImageList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
     recyclerViewImageList.setAdapter(addMyBucketListAdapter);
 

+ 2 - 4
app/src/main/res/layout/add_my_bucket_image_list.xml

@@ -3,10 +3,8 @@
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   xmlns:tools="http://schemas.android.com/tools"
-  android:layout_width="64dp"
-  android:layout_height="52dp"
-  android:paddingStart="6dp"
-  android:paddingEnd="6dp">
+  android:layout_width="wrap_content"
+  android:layout_height="52dp">
 
   <ImageView
     android:id="@+id/image_view_select_border"

+ 3 - 0
app/src/main/res/layout/fragment_add_my_bucket_list.xml

@@ -65,6 +65,9 @@
     android:layout_width="match_parent"
     android:layout_height="53dp"
     android:layout_marginBottom="9dp"
+    android:clipToPadding="false"
+    android:paddingStart="21dp"
+    android:paddingEnd="21dp"
     app:layout_constraintBottom_toTopOf="@+id/text_view_my_bucket_detail"
     app:layout_goneMarginBottom="20dp"/>
 

+ 1 - 0
app/src/main/res/layout/fragment_main.xml

@@ -37,6 +37,7 @@
 
     <LinearLayout
       android:id="@+id/layout_test"
+      tools:visibility="gone"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:background="@color/CFFFFFF"