Quellcode durchsuchen

[마이][Common] 버킷 리스트 자동 워드랩 임시 제거

Hasemi vor 7 Jahren
Ursprung
Commit
bb27a2da85

+ 5 - 4
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/my/bucketlist/BucketListDefaultDetailFragment.java

@@ -1,6 +1,5 @@
 package kr.co.zumo.app.lifeplus.view.screen.my.bucketlist;
 
-import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -34,6 +33,7 @@ public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefa
 
   private TextView textViewBucketTitle;
   private ImageView imageViewBucketBackground;
+  private ImageView imageViewCheck;
 
   @Override
   protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -45,6 +45,7 @@ public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefa
   protected void onAfterActivityCreated(Bundle savedInstanceState) {
     textViewBucketTitle = findViewById(R.id.text_view_bucket_title);
     imageViewBucketBackground = findViewById(R.id.image_view_bucket_background);
+    imageViewCheck = findViewById(R.id.image_checker);
     textViewBucketTitle.setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.UPDATE).build());});
   }
 
@@ -117,6 +118,7 @@ public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefa
 
   @Override
   public void setContentsText(String str) {
+    str = str.replace(" ", "\u00A0");
     textViewBucketTitle.setText(str);
   }
 
@@ -127,12 +129,11 @@ public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefa
 
   @Override
   public void setNavigationBarCompleted(boolean isCompleted) {
-    Drawable checkImageResource = getActivity().getResources().getDrawable(R.drawable.icon_bucket_complete_white);
     if (isCompleted) {
-      textViewBucketTitle.setCompoundDrawablesWithIntrinsicBounds(checkImageResource, null, null, null);
+      imageViewCheck.setVisibility(View.VISIBLE);
     }
     else {
-      textViewBucketTitle.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
+      imageViewCheck.setVisibility(View.GONE);
     }
     getHelper(ActionBarHelper.class).setCompleted(isCompleted);
   }

+ 1 - 7
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/my/bucketlist/BucketListWithTagDetailFragment.java

@@ -189,19 +189,13 @@ public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWith
 
   @Override
   public void setBucketTitle(String str) {
+    str = str.replace(" ", "\u00A0");
     textBucketTitle.setText(str);
   }
 
   @Override
   public void setCompleted(boolean isCompleted) {
     imageChecker.setVisibility(isCompleted ? View.VISIBLE : View.GONE);
-//    Drawable checkImageResource = getActivity().getResources().getDrawable(R.drawable.icon_bucket_complete_white);
-//    if (isCompleted) {
-//      textTagTitle.setCompoundDrawablesWithIntrinsicBounds(checkImageResource, null, null, null);
-//    }
-//    else {
-//      textTagTitle.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
-//    }
     getHelper(ActionBarHelper.class).setCompleted(isCompleted);
   }
 

+ 22 - 9
app/src/main/res/layout/fragment_bucket_list_default_detail.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <android.support.constraint.ConstraintLayout
-  android:id="@+id/layout_container"
   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:id="@+id/layout_container"
   android:layout_width="match_parent"
   android:layout_height="match_parent">
 
@@ -27,25 +27,38 @@
     android:src="@drawable/rectangle_dim_black_50"
     app:layout_constraintTop_toTopOf="@+id/image_view_bucket_background"/>
 
+  <ImageView
+    android:id="@+id/image_checker"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="80dp"
+    android:layout_marginTop="10dp"
+    app:layout_constraintEnd_toStartOf="@+id/text_view_bucket_title"
+    app:layout_constraintHorizontal_chainStyle="packed"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="@+id/text_view_bucket_title"
+    app:srcCompat="@drawable/icon_bucket_complete_white"
+    />
+
   <TextView
     android:id="@+id/text_view_bucket_title"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:layout_marginStart="70dp"
-    android:layout_marginEnd="70dp"
+    android:layout_marginStart="5dp"
+    android:layout_marginEnd="80dp"
+    android:layout_marginBottom="20dp"
     android:ellipsize="end"
     android:gravity="center"
     android:lineSpacingExtra="8sp"
+    android:maxWidth="255dp"
     android:maxLines="3"
-    android:drawableStart="@drawable/icon_bucket_complete_white"
-    android:drawablePadding="5dp"
     android:textColor="@color/CFFFFFF"
-    android:textSize="21sp"
-    app:layout_constrainedWidth="true"
+    android:textSize="21dp"
     app:layout_constraintBottom_toBottomOf="parent"
     app:layout_constraintEnd_toEndOf="parent"
-    app:layout_constraintStart_toStartOf="@+id/imageView"
+    app:layout_constraintHorizontal_chainStyle="packed"
+    app:layout_constraintStart_toEndOf="@+id/image_checker"
     app:layout_constraintTop_toTopOf="parent"
-    app:layout_goneMarginStart="50dp"
+    app:layout_goneMarginStart="80dp"
     tools:text="나를 위한 선물, 명풍\n구매하기나를 위한 선물, 명풍\n구매하기나를 위한 선물, 명풍\n구매하기"/>
 </android.support.constraint.ConstraintLayout>

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

@@ -92,7 +92,7 @@
             android:ellipsize="end"
             android:gravity="center"
             android:lineSpacingExtra="8sp"
-            android:maxWidth="200dp"
+            android:maxWidth="255dp"
             android:maxLines="3"
             android:textColor="@color/CFFFFFF"
             android:textSize="21dp"
@@ -102,7 +102,7 @@
             app:layout_constraintStart_toEndOf="@+id/image_checker"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_goneMarginStart="80dp"
-            tools:text="OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"/>
+            tools:text="미슐랭 3스타레스토랑 찾아가기 "/>
 
         </android.support.constraint.ConstraintLayout>