X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Factivity%2FMainActivity.java;h=afa9c71e2916c3df0e8c2ed163db4663f7a56053;hp=d20e63f05ea8a886264598fe52e7e103158447ec;hb=03878de43643ddd63449d9a97f1b8bf56f90132c;hpb=0e1ae0f10b4dd5bb6b268f6d448c8cae94f14a33 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..afa9c71e 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(); } @@ -579,8 +577,9 @@ public class MainActivity extends ProfileThemedActivity { public void onRetrieveStart() { ProgressBar progressBar = findViewById(R.id.transaction_list_progress_bar); bTransactionListCancelDownload.setEnabled(true); - progressBar.setIndeterminateTintList(ColorStateList.valueOf(Colors.primary)); - progressBar.setProgressTintList(ColorStateList.valueOf(Colors.primary)); + ColorStateList csl = Colors.getColorStateList(); + progressBar.setIndeterminateTintList(csl); + progressBar.setProgressTintList(csl); progressBar.setIndeterminate(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) progressBar.setProgress(0, false); else progressBar.setProgress(0);