]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java
fixes after migration to ViewPager2
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / ui / account_summary / AccountSummaryFragment.java
index 9654f140f5739cdfe800e939e0eef4f535e24590..c4f863cb5de753350a8b492d0f8e9be8e83bcb42 100644 (file)
@@ -79,7 +79,7 @@ public class AccountSummaryFragment extends MobileLedgerListFragment {
         modelAdapter = new AccountSummaryAdapter(model);
         MainActivity mainActivity = getMainActivity();
 
-        root = mainActivity.findViewById(R.id.account_root);
+        root = view.findViewById(R.id.account_root);
         LinearLayoutManager llm = new LinearLayoutManager(mainActivity);
         llm.setOrientation(RecyclerView.VERTICAL);
         root.setLayoutManager(llm);
@@ -92,7 +92,7 @@ public class AccountSummaryFragment extends MobileLedgerListFragment {
 
         manageFabOnScroll();
 
-        refreshLayout = mainActivity.findViewById(R.id.account_swipe_refresh_layout);
+        refreshLayout = view.findViewById(R.id.account_swipe_refresh_layout);
         Colors.themeWatch.observe(getViewLifecycleOwner(), this::themeChanged);
         refreshLayout.setOnRefreshListener(() -> {
             debug("ui", "refreshing accounts via swipe");