From: Damyan Ivanov Date: Sun, 25 Apr 2021 16:42:55 +0000 (+0300) Subject: rename an event handler using the onXXX style X-Git-Tag: v0.18.0~18 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=311cb018cc9cd6be1f189e2fc674a517ff4d47fc;p=mobile-ledger.git rename an event handler using the onXXX style --- 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()));