Quellcode durchsuchen

[콘텐츠][New] 리스티클 배너 타이틀/서브타이틀 2줄로 제한 "..." 처리

hyodong.min vor 6 Jahren
Ursprung
Commit
b2092e4d0c

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsListicleCoverHolder.java

@@ -113,7 +113,7 @@ public class ContentsListicleCoverHolder extends ContentsHolder<ContentsItemBean
     }
 
     textViewSubTitle.setText(bean.getSubTitle());
-    textViewTitle.setText(bean.getTwoLineTitle());
+    textViewTitle.setText(bean.getTitle());
     int len = bean.getTagList().size();
     len = Math.min(len, 3);
 

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

@@ -94,7 +94,7 @@
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"
     app:layout_constraintTop_toBottomOf="@+id/layout_category"
-    tools:text="테스트_콘등 리 스 티 클 트렌드_IT 테스트_콘등트렌드_IT 테스트_콘등"/>
+    tools:text="테스트_콘등 리 스 티 클 트렌드_IT 테스트_콘등트렌드_IT 테스트_콘등 테스트_콘등 리 스 티 클 트렌드_IT 테스트_콘등트렌드_IT 테스트_콘등 테스트_콘등 리 스 티 클 트렌드_IT 테스트_콘등트렌드_IT 테스트_콘등"/>
 
   <TextView
     android:id="@+id/text_view_title"
@@ -112,7 +112,7 @@
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"
     app:layout_constraintTop_toBottomOf="@+id/text_view_sub_title"
-    tools:text="테스트_콘등 리 스 티 클 트렌드_IT"/>
+    tools:text="테스트_콘등 리 스 티 클 트렌드_IT 테스트_콘등 리 스 티 클 트렌드_IT 테스트_콘등 리 스 티 클 트렌드_IT 테스트_콘등 리 스 티 클 트렌드_IT"/>
 
   <TextView
     android:id="@+id/text_view_tag1"

+ 18 - 4
app/src/main/res/layout/custom_listicle_image_view.xml

@@ -54,7 +54,6 @@
     />
 
 
-
   <android.support.constraint.ConstraintLayout
     android:id="@+id/layout_pager"
     android:layout_width="wrap_content"
@@ -165,28 +164,43 @@
 
   <TextView
     android:id="@+id/text_view_title"
-    android:layout_width="wrap_content"
+    android:layout_width="0dp"
     android:layout_height="wrap_content"
     android:layout_marginStart="25dp"
+    android:layout_marginEnd="25dp"
     android:layout_marginBottom="4dp"
+    android:ellipsize="end"
     android:lineSpacingExtra="7dp"
+    android:maxLines="2"
     android:textColor="@color/CFFFFFF"
     android:textSize="18dp"
+    app:layout_constrainedWidth="true"
     app:layout_constraintBottom_toTopOf="@+id/text_view_sub_title"
+    app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"
-    tools:text="진주, 로스팅웨어"/>
+    tools:text="대문샷을 부르는 감각적인 로스팅 팩토리
+대문샷을 부르는 감각적인 로스팅 팩토리 대문샷을 부르는 감각적인 로스팅 팩토리
+대문샷을 부르는 감각적인 로스팅 팩토리 대문샷을 부르는 감각적인 로스팅 팩토리
+대문샷을 부르는 감각적인 로스팅 팩토리"/>
 
   <TextView
     android:id="@+id/text_view_sub_title"
-    android:layout_width="wrap_content"
+    android:layout_width="0dp"
     android:layout_height="wrap_content"
     android:layout_marginStart="25dp"
+    android:layout_marginEnd="25dp"
     android:layout_marginBottom="4dp"
+    android:ellipsize="end"
     android:lineSpacingExtra="4dp"
+    android:maxLines="2"
     android:textColor="@color/CFFFFFF"
     android:textSize="12sp"
+    app:layout_constrainedWidth="true"
     app:layout_constraintBottom_toTopOf="@+id/layout_pager"
+    app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"
     tools:text="대문샷을 부르는 감각적인 로스팅 팩토리
+대문샷을 부르는 감각적인 로스팅 팩토리 대문샷을 부르는 감각적인 로스팅 팩토리
+대문샷을 부르는 감각적인 로스팅 팩토리 대문샷을 부르는 감각적인 로스팅 팩토리
 대문샷을 부르는 감각적인 로스팅 팩토리"/>
 </android.support.constraint.ConstraintLayout>