diff --git a/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/PolicyRvItem.kt b/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/PolicyRvItem.kt index 1906573a3..fbb3b4e8b 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/PolicyRvItem.kt +++ b/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/PolicyRvItem.kt @@ -27,23 +27,6 @@ class PolicyRvItem(val item: MagiskPolicy, val icon: Drawable) : ComparableRvIte val shouldLog = KObservableField(item.logging) fun toggle() = isExpanded.toggle() - fun toggleNotify() = shouldNotify.toggle() - fun toggleLog() = shouldLog.toggle() - - fun toggleEnabled() { - if (isExpanded.value) { - return - } - isEnabled.toggle() - } - - fun toggle(view: View) { - toggle() - view.rotationTo(if (isExpanded.value) 225 else 180) - (view.parent as ViewGroup) - .findViewById(R.id.expand_layout) - .setRevealed(isExpanded.value) - } private val rxBus: RxBus by inject() @@ -100,7 +83,7 @@ class PolicyItem(val item: MagiskPolicy, val icon: Drawable) : ComparableRvItem< isExpanded.toggle() view.rotationTo(if (isExpanded.value) 225 else 180) (view.parent as ViewGroup) - .findViewById(R.id.expand_layout) + .findViewById(R.id.policy_expand_container) .setRevealed(isExpanded.value) } diff --git a/app/src/main/res/color/color_state_primary_transient.xml b/app/src/main/res/color/color_state_primary_transient.xml new file mode 100644 index 000000000..f979fd372 --- /dev/null +++ b/app/src/main/res/color/color_state_primary_transient.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_policy_md2.xml b/app/src/main/res/layout/item_policy_md2.xml index 710fdfc59..c330d9146 100644 --- a/app/src/main/res/layout/item_policy_md2.xml +++ b/app/src/main/res/layout/item_policy_md2.xml @@ -33,7 +33,7 @@ android:paddingBottom="@dimen/l2"> + app:tint="@color/color_state_primary_transient" /> + app:tint="@color/color_state_primary_transient" />