From b808e24e5aa0e49660a2ddad8809d583793d7c41 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 15 Feb 2020 18:53:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt b/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt index 22f982cf6..6c415fcbd 100644 --- a/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/LabelsBar.kt @@ -21,7 +21,7 @@ class LabelsBar(context: Context, attrs: AttributeSet?) : LinearLayout(context, } fun setLabels(labels: List) { - removeAllViews() + clear() labels.forEach { addLabel(it) } @@ -53,5 +53,4 @@ class LabelsBar(context: Context, attrs: AttributeSet?) : LinearLayout(context, tv.text = label addView(tv) } - } \ No newline at end of file