From: Damyan Ivanov Date: Tue, 16 Feb 2021 20:16:42 +0000 (+0200) Subject: use expression lambda X-Git-Tag: v0.17.0~113 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=87959153735c79d68f8576cca29c1413554f4876;p=mobile-ledger.git use expression lambda --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java index c7e59c3d..4ade0e71 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java @@ -651,9 +651,8 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter { - b.negateAmountSwitch.toggle(); - }; + final View.OnClickListener negLabelClickListener = + (view) -> b.negateAmountSwitch.toggle(); b.templateDetailsNegateAmountLabel.setOnClickListener(negLabelClickListener); b.templateDetailsNegateAmountText.setOnClickListener(negLabelClickListener); b.patternAccountLabel.setOnTouchListener((v, event) -> {