From 329a21848f43c9d94e6252e7d9cc35eea9af7cc3 Mon Sep 17 00:00:00 2001 From: Kr328 Date: Mon, 21 Feb 2022 20:29:46 +0800 Subject: [PATCH] Fix: disable search on loading apps --- .../com/github/kr328/clash/design/AccessControlDesign.kt | 2 ++ design/src/main/res/layout/design_access_control.xml | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/design/src/main/java/com/github/kr328/clash/design/AccessControlDesign.kt b/design/src/main/java/com/github/kr328/clash/design/AccessControlDesign.kt index cc1d2c80..2e025d93 100644 --- a/design/src/main/java/com/github/kr328/clash/design/AccessControlDesign.kt +++ b/design/src/main/java/com/github/kr328/clash/design/AccessControlDesign.kt @@ -45,6 +45,8 @@ class AccessControlDesign( suspend fun patchApps(apps: List) { adapter.swapDataSet(adapter::apps, apps, false) + + binding.searchView.visibility = View.VISIBLE } suspend fun rebindAll() { diff --git a/design/src/main/res/layout/design_access_control.xml b/design/src/main/res/layout/design_access_control.xml index 6593afb8..7d8fa18f 100644 --- a/design/src/main/res/layout/design_access_control.xml +++ b/design/src/main/res/layout/design_access_control.xml @@ -1,6 +1,7 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> + android:src="@drawable/ic_baseline_search" + android:visibility="invisible" + tools:visibility="visible" />