From cc4258cbc1c44b82acbfa299f8c7371804c20963 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 5 Nov 2019 20:14:20 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt | 2 +- app/src/main/res/layout/item_text.xml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt b/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt index 205cf4e2c..c0d19851f 100644 --- a/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt @@ -73,6 +73,7 @@ class ExploreAdapter(context: Context, private val scope: CoroutineScope, val ca kindList.map { kind -> val tv = LayoutInflater.from(context) .inflate(R.layout.item_text, gl_child, false) + gl_child.addView(tv) tv.text_view.text = kind.title tv.text_view.onClick { kind.url?.let { kindUrl -> @@ -83,7 +84,6 @@ class ExploreAdapter(context: Context, private val scope: CoroutineScope, val ca ) } } - gl_child.addView(tv) } } }.onFinally { diff --git a/app/src/main/res/layout/item_text.xml b/app/src/main/res/layout/item_text.xml index 87687a713..331bd8a2c 100644 --- a/app/src/main/res/layout/item_text.xml +++ b/app/src/main/res/layout/item_text.xml @@ -6,12 +6,10 @@ android:layout_height="wrap_content" android:layout_margin="3dp" android:background="@drawable/selector_fillet_btn_bg" - android:clickable="true" android:ellipsize="end" - android:focusable="true" android:gravity="center" android:padding="5dp" - android:singleLine="true" + android:maxLines="1" android:textColor="@color/tv_text_default" android:textSize="14sp" tools:ignore="UnusedAttribute" />