From 2c664a7e80c6efb38ab9a5d44c3de480d5cf7ecb Mon Sep 17 00:00:00 2001 From: HapeLee <1321903405@qq.com> Date: Sat, 1 Nov 2025 13:47:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=8E=B0=E9=A1=B5=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=B8=8D=E4=B8=80=E8=87=B4=20#188?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/main/explore/ExploreAdapter.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 ab3a4a9de..9f6823e8a 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 @@ -79,6 +79,7 @@ class ExploreAdapter( }.onFinally { rotateLoading.gone() } + } else { ivStatus.isChecked = false recyclerFlexbox(flexbox) @@ -116,11 +117,21 @@ class ExploreAdapter( @Synchronized private fun getFlexboxChild(flexbox: FlexboxLayout): MaterialCardView { - return if (recycler.isEmpty()) { + val cardView = if (recycler.isEmpty()) { ItemFilletTextBinding.inflate(inflater, flexbox, false).root } else { recycler.removeLastElement() as MaterialCardView } + val lp = FlexboxLayout.LayoutParams( + ViewGroup.LayoutParams.WRAP_CONTENT, + ViewGroup.LayoutParams.WRAP_CONTENT + ) + cardView.layoutParams = lp + cardView.forceLayout() + val tv = cardView.findViewById(R.id.text_view) + tv.text = "" + tv.requestLayout() + return cardView } @Synchronized