From 86d517b05c6f7e20dca42c332ab6f395e425f732 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 12 Jan 2019 06:35:23 +0000 Subject: [PATCH] fix nav colouring after landscape adjustments --- .../ui/activity/MainActivity.java | 3 +- app/src/main/res/layout/activity_main.xml | 48 +++++++++++-------- 2 files changed, 30 insertions(+), 21 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 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"> - - - - - + + + + + + + + + -- 2.39.5