]> git.ktnx.net Git - mobile-ledger.git/commitdiff
rename an event handler using the onXXX style
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 25 Apr 2021 16:42:55 +0000 (19:42 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 25 Apr 2021 17:07:58 +0000 (17:07 +0000)
app/src/main/java/net/ktnx/mobileledger/async/DescriptionSelectedCallback.java
app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java
app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionHeaderItemHolder.java

index 992abd1fafd7263fb477a21620f220fa627c2dbf..20d669413f12c6e6d92014cdecfcf78e6b3cf703 100644 (file)
@@ -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);
 }
index fabc0dff542b1bd3427530475ba55a3ae753dcb2..51f872f6fef08c612c0c1d24d1b2436b1b9105fe 100644 (file)
@@ -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;
index 7725e73cfd7cfcf545b3c7c38a891492881e2240..cac93b6b63326513e354e893abb65ce2ec75a099 100644 (file)
@@ -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()));