X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;ds=sidebyside;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Faccount_summary%2FAccountSummaryFragment.java;h=e6ba48fb05e5b7bb2a6e8e32bbe8a60c64adf1d2;hb=c7cb254623c182cf8f37fbd445855e85c09d0157;hp=d75577ff3d8f94c26f82a2493a960242d9605a78;hpb=d1cdfcec0a7e66bc0fb49bc19e0dff540caac899;p=mobile-ledger.git diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java index d75577ff..e6ba48fb 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java @@ -44,10 +44,10 @@ import static net.ktnx.mobileledger.utils.Logger.debug; public class AccountSummaryFragment extends MobileLedgerListFragment { public AccountSummaryAdapter modelAdapter; -/* - private MenuItem mShowOnlyStarred; - private Menu optMenu; -*/ + /* + private MenuItem mShowOnlyStarred; + private Menu optMenu; + */ private FloatingActionButton fab; @Override public void onCreate(@Nullable Bundle savedInstanceState) { @@ -83,7 +83,8 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { llm.setOrientation(RecyclerView.VERTICAL); root.setLayoutManager(llm); root.setAdapter(modelAdapter); - DividerItemDecoration did = new DividerItemDecoration(mActivity, DividerItemDecoration.VERTICAL); + DividerItemDecoration did = + new DividerItemDecoration(mActivity, DividerItemDecoration.VERTICAL); root.addItemDecoration(did); fab = mActivity.findViewById(R.id.btn_add_transaction); @@ -124,15 +125,9 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { // })); mActivity.fabShouldShow(); - root.addOnScrollListener(new RecyclerView.OnScrollListener() { - @Override - public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { - if (fab != null) { - if (dy < 0) mActivity.fabShouldShow(); - if (dy > 0) fab.hide(); - } - } - }); + + manageFabOnScroll(); + swiper = mActivity.findViewById(R.id.account_swiper); Colors.themeWatch.observe(this, this::themeChanged); swiper.setOnRefreshListener(() -> {