From a2dc63d207789751f6ed51cdc361a4f5ac5ed8cf Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 18 May 2019 12:43:47 +0300 Subject: [PATCH] remote fragmentManager field --- .../net/ktnx/mobileledger/ui/activity/MainActivity.java | 6 ++---- 1 file changed, 2 insertions(+), 4 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 d20e63f0..be2702fb 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 @@ -88,7 +88,6 @@ public class MainActivity extends ProfileThemedActivity { public AccountSummaryFragment mAccountSummaryFragment; DrawerLayout drawer; private View profileListHeadMore, profileListHeadCancel, profileListHeadAddProfile; - private FragmentManager fragmentManager; private View bTransactionListCancelDownload; private SectionsPagerAdapter mSectionsPagerAdapter; private ViewPager mViewPager; @@ -161,8 +160,7 @@ public class MainActivity extends ProfileThemedActivity { profileListHeadAddProfile = findViewById(R.id.nav_new_profile_button); drawer = findViewById(R.id.drawer_layout); bTransactionListCancelDownload = findViewById(R.id.transaction_list_cancel_download); - fragmentManager = getSupportFragmentManager(); - mSectionsPagerAdapter = new SectionsPagerAdapter(fragmentManager); + mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); mViewPager = findViewById(R.id.root_frame); Bundle extra = getIntent().getBundleExtra(BUNDLE_SAVED_STATE); @@ -540,7 +538,7 @@ public class MainActivity extends ProfileThemedActivity { } else { debug("fragments", String.format(Locale.ENGLISH, "manager stack: %d", - fragmentManager.getBackStackEntryCount())); + getSupportFragmentManager().getBackStackEntryCount())); super.onBackPressed(); } -- 2.39.5