From 311cb018cc9cd6be1f189e2fc674a517ff4d47fc Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 25 Apr 2021 19:42:55 +0300 Subject: [PATCH] rename an event handler using the onXXX style --- .../ktnx/mobileledger/async/DescriptionSelectedCallback.java | 4 ++-- .../ui/new_transaction/NewTransactionActivity.java | 2 +- .../ui/new_transaction/NewTransactionHeaderItemHolder.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/async/DescriptionSelectedCallback.java b/app/src/main/java/net/ktnx/mobileledger/async/DescriptionSelectedCallback.java index 992abd1f..20d66941 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/DescriptionSelectedCallback.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/DescriptionSelectedCallback.java @@ -1,5 +1,5 @@ /* - * Copyright © 2019 Damyan Ivanov. + * Copyright © 2021 Damyan Ivanov. * This file is part of MoLe. * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -18,5 +18,5 @@ package net.ktnx.mobileledger.async; public interface DescriptionSelectedCallback { - void descriptionSelected(String description); + void onDescriptionSelected(String description); } diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java index fabc0dff..51f872f6 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java @@ -351,7 +351,7 @@ public class NewTransactionActivity extends ProfileThemedActivity .create() .show(); } - public void descriptionSelected(String description) { + public void onDescriptionSelected(String description) { debug("description selected", description); if (!model.accountListIsEmpty()) return; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionHeaderItemHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionHeaderItemHolder.java index 7725e73c..cac93b6b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionHeaderItemHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionHeaderItemHolder.java @@ -101,7 +101,7 @@ class NewTransactionHeaderItemHolder extends NewTransactionItemViewHolder b.newTransactionDescription.setAdapter( new TransactionDescriptionAutocompleteAdapter(activity)); b.newTransactionDescription.setOnItemClickListener( - (parent, view, position, id) -> activity.descriptionSelected( + (parent, view, position, id) -> activity.onDescriptionSelected( parent.getItemAtPosition(position) .toString())); -- 2.39.5