From b8b0c37ef75e735ccbf4de66353e54c283be9344 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Mon, 28 Dec 2020 18:47:55 +0200 Subject: [PATCH] replace xml onClick declaration with run-time hooking declarative handlers are deprecated --- .../java/net/ktnx/mobileledger/ui/activity/MainActivity.java | 2 ++ app/src/main/res/layout/activity_main.xml | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 2fc09379..92cb1f4b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -301,6 +301,8 @@ public class MainActivity extends ProfileThemedActivity { Data.lastUpdateDate.observe(this, date -> refreshLastUpdateInfo()); Data.lastUpdateTransactionCount.observe(this, date -> refreshLastUpdateInfo()); Data.lastUpdateAccountCount.observe(this, date -> refreshLastUpdateInfo()); + b.navAccountSummary.setOnClickListener(this::onAccountSummaryClicked); + b.navLatestTransactions.setOnClickListener(this::onLatestTransactionsClicked); } private void scheduleDataRetrievalIfStale(long lastUpdate) { long now = new Date().getTime(); diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1fc6d8b6..06feeb10 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -292,7 +292,6 @@ @@ -300,7 +299,6 @@ -- 2.39.5