From: Damyan Ivanov Date: Sat, 12 Jan 2019 06:35:23 +0000 (+0000) Subject: fix nav colouring after landscape adjustments X-Git-Tag: v0.3~58 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=86d517b05c6f7e20dca42c332ab6f395e425f732;p=mobile-ledger.git fix nav colouring after landscape adjustments --- 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 f16de22d..a59ec036 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 @@ -257,6 +257,7 @@ public class MainActivity extends AppCompatActivity { } private void showAccountSummaryFragment() { mViewPager.setCurrentItem(0, true); + TransactionListFragment.accountFilter.set(null); // FragmentTransaction ft = fragmentManager.beginTransaction(); // accountSummaryFragment = new AccountSummaryFragment(); // ft.replace(R.id.root_frame, accountSummaryFragment); @@ -272,7 +273,7 @@ public class MainActivity extends AppCompatActivity { // fragmentManager.popBackStack(0, FragmentManager.POP_BACK_STACK_INCLUSIVE); } private void showTransactionsFragment(LedgerAccount account) { - TransactionListFragment.accountFilter.set(account.getName()); + if (account != null) TransactionListFragment.accountFilter.set(account.getName()); mViewPager.setCurrentItem(1, true); // FragmentTransaction ft = fragmentManager.beginTransaction(); // if (transactionListFragment == null) { diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 81b8a28c..e29e6739 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -232,7 +232,7 @@ app:layout_constraintTop_toTopOf="parent"> - - - - - + + + + + + + + +