From 87959153735c79d68f8576cca29c1413554f4876 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Tue, 16 Feb 2021 22:16:42 +0200 Subject: [PATCH] use expression lambda --- .../mobileledger/ui/templates/TemplateDetailsAdapter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) -> { -- 2.39.5