]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix nav colouring after landscape adjustments
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 12 Jan 2019 06:35:23 +0000 (06:35 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 12 Jan 2019 06:35:23 +0000 (06:35 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
app/src/main/res/layout/activity_main.xml

index f16de22d84b3cce63e07118f063fea6afe5d5c39..a59ec036bf579dfc90ff3d248e481e03ebc475c4 100644 (file)
@@ -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) {
index 81b8a28c04e03cf634f8c6ca9908069e985a66b2..e29e67390376ee6062cd262ac61519470d2b086b 100644 (file)
                     app:layout_constraintTop_toTopOf="parent">
 
                     <LinearLayout
-                        android:id="@+id/nav_actions"
+                        android:id="@+id/nav_upper"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:orientation="vertical"
 
                         </LinearLayout>
 
-                        <TextView
-                            android:id="@+id/nav_account_summary"
-                            style="@style/nav_button"
-                            android:drawableStart="@drawable/ic_home_black_24dp"
-                            android:onClick="onAccountSummaryClicked"
-                            android:text="@string/account_summary_title" />
-
-                        <TextView
-                            android:id="@+id/nav_latest_transactions"
-                            style="@style/nav_button"
-                            android:drawableStart="@drawable/ic_event_note_black_24dp"
-                            android:onClick="onLatestTransactionsClicked"
-                            android:text="@string/nav_latest_transactions_title" />
-
-                        <TextView
-                            android:id="@+id/textView5"
-                            style="@style/nav_button"
-                            android:drawableStart="@drawable/ic_assignment_black_24dp"
-                            android:text="@string/nav_reports_title" />
+                        <LinearLayout
+                            android:id="@+id/nav_actions"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:orientation="vertical">
+
+                            <TextView
+                                android:id="@+id/nav_account_summary"
+                                style="@style/nav_button"
+                                android:drawableStart="@drawable/ic_home_black_24dp"
+                                android:onClick="onAccountSummaryClicked"
+                                android:text="@string/account_summary_title" />
+
+                            <TextView
+                                android:id="@+id/nav_latest_transactions"
+                                style="@style/nav_button"
+                                android:drawableStart="@drawable/ic_event_note_black_24dp"
+                                android:onClick="onLatestTransactionsClicked"
+                                android:text="@string/nav_latest_transactions_title" />
+
+                            <TextView
+                                android:id="@+id/textView5"
+                                style="@style/nav_button"
+                                android:drawableStart="@drawable/ic_assignment_black_24dp"
+                                android:text="@string/nav_reports_title" />
+
+                        </LinearLayout>
 
                     </LinearLayout>
                 </ScrollView>