From 7be5937aa0875ffb6b10f7865caa5c2f49af4934 Mon Sep 17 00:00:00 2001 From: tonymanou Date: Mon, 9 Jan 2017 22:27:25 +0100 Subject: [PATCH] Using checked state listener instead of click listener --- .../java/com/topjohnwu/magisk/adapters/ModulesAdapter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java index b3a35b6df..781658c50 100644 --- a/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java @@ -47,10 +47,10 @@ public class ModulesAdapter extends RecyclerView.Adapter { - CheckBox checkBox = (CheckBox) v; - if (checkBox.isChecked()) { + holder.checkBox.setOnCheckedChangeListener((v, isChecked) -> { + if (isChecked) { new Async.RootTask() { @Override protected Void doInBackground(Void... voids) {