This commit is contained in:
FooIbar authored and tarsin committed 2023-01-02 08:44:31 +08:00
1 parent 063087c87e
commit 41572e98ba
1 file changed
+9 -2
@@ -102,8 +102,15 @@ class SearchLayout @JvmOverloads constructor(
mChip.idt = mPair.first
mChip.isChecked = NumberUtils.int2boolean(mPair.first and mCategoryStored)
mChip.setOnLongClickListener {
mCategoryGroup.clearCheck()
mChip.isChecked = true
if (mChip.isChecked) {
for (i in 1 until mCategoryGroup.childCount + 1) {
mCategoryGroup.check(i)
}
mChip.isChecked = false
} else {
mCategoryGroup.clearCheck()
mChip.isChecked = true
}
true
}
mCategoryGroup.addView(mChip)