From ffec15332fc5eb907dde8b35d9c9c17c1e546cf2 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Tue, 27 Nov 2018 21:09:17 +0000 Subject: [PATCH] exit when the Exit drawer item is clicked --- .../main/java/net/ktnx/mobileledger/LatestTransactions.java | 6 ++++++ app/src/main/res/layout/drawer.xml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java b/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java index f8c70604..111b71e9 100644 --- a/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java +++ b/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java @@ -10,6 +10,7 @@ import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; +import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -52,6 +53,11 @@ public class LatestTransactions extends AppCompatActivity } } + public void nav_exit_clicked(View view) { + Log.w("mobileledger", "exiting"); + finish(); + } + @Override public void onBackPressed() { DrawerLayout drawer = findViewById(R.id.drawer_layout); diff --git a/app/src/main/res/layout/drawer.xml b/app/src/main/res/layout/drawer.xml index b8f069ff..1f03cfc3 100644 --- a/app/src/main/res/layout/drawer.xml +++ b/app/src/main/res/layout/drawer.xml @@ -83,10 +83,11 @@ android:text="@string/action_settings" /> -- 2.39.5