feat: 优化代码

pull/103/head
kunfei 5 years ago
parent 5a6b13de84
commit b808e24e5a
  1. 3
      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<String>) { fun setLabels(labels: List<String>) {
removeAllViews() clear()
labels.forEach { labels.forEach {
addLabel(it) addLabel(it)
} }
@ -53,5 +53,4 @@ class LabelsBar(context: Context, attrs: AttributeSet?) : LinearLayout(context,
tv.text = label tv.text = label
addView(tv) addView(tv)
} }
} }
Loading…
Cancel
Save