]> git.ktnx.net Git - mobile-ledger.git/commitdiff
store current page index on page change
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 May 2019 19:57:37 +0000 (22:57 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 May 2019 19:57:37 +0000 (22:57 +0300)
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

app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index d7447f070c86262fa885eaba61ae40e105ad995a..dcb5d18ad31cc16cae2d9024c991de5a2231fa1c 100644 (file)
@@ -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);