From 4cec0e91508f609f4d059789badf08a0beb686b5 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 5 May 2019 22:57:37 +0300 Subject: [PATCH] store current page index on page change this was the missing piece to store the current page in the saved state so that when the app is switched out and then back in the page is kept --- .../java/net/ktnx/mobileledger/ui/activity/MainActivity.java | 1 + 1 file changed, 1 insertion(+) 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 d7447f07..dcb5d18a 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 @@ -206,6 +206,7 @@ public class MainActivity extends ProfileThemedActivity { pageChangeListener = new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { + mCurrentPage = position; switch (position) { case 0: markDrawerItemCurrent(R.id.nav_account_summary); -- 2.39.5