]> git.ktnx.net Git - mobile-ledger.git/commitdiff
note the 'Account summary' item in the navigation drawer when the Account summary...
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 Dec 2018 08:15:26 +0000 (08:15 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 Dec 2018 08:15:26 +0000 (08:15 +0000)
app/src/main/java/net/ktnx/mobileledger/AccountSummary.java
app/src/main/res/layout/content_new_transaction.xml
app/src/main/res/layout/drawer.xml
app/src/main/res/values/colors.xml
app/src/main/res/values/styles.xml

index 2b05c1b3b2559435208dc6455c4db3b1d4b6e67a..0973590cfa7641a7dcd6b53c322b57dec18b21c5 100644 (file)
@@ -75,6 +75,15 @@ public class AccountSummary extends AppCompatActivity {
         update_accounts(false);
     }
 
+    @Override
+    protected void onStart() {
+        super.onStart();
+        LinearLayout grp = drawer.findViewById(R.id.nav_actions);
+        for (int i = 0; i < grp.getChildCount(); i++)
+            grp.getChildAt(i).setBackgroundColor(getResources().getColor(R.color.drawer_background, getTheme()));
+        drawer.findViewById(R.id.nav_account_summary).setBackgroundColor(getResources().getColor(R.color.table_row_even_bg, getTheme()));
+    }
+
     public void fab_new_transaction_clicked(View view) {
         Intent intent = new Intent(this, NewTransactionActivity.class);
         startActivity(intent);
index b4b6babedf9bc1a90e3310dba53742171682d1a0..89e3c2cecca001d3ce9e22e79a57dea8c7d0afbd 100644 (file)
@@ -70,7 +70,8 @@
                         android:width="0dp"
                         android:hint="@string/new_transaction_account_hint"
                         android:nextFocusDown="@id/new_transaction_amt_1"
-                        android:nextFocusForward="@id/new_transaction_amt_1" />
+                        android:nextFocusForward="@id/new_transaction_amt_1"
+                        android:textColorLink="@android:color/background_light" />
 
                     <EditText
                         android:id="@+id/new_transaction_amt_1"
index 6687d0dac9be0c4984c327297c715e762f1b758a..3dc96fd4bbd14ef503155725ad508269a025541c 100644 (file)
@@ -7,7 +7,8 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_alignParentStart="true"
-        android:layout_alignParentTop="true">
+        android:layout_alignParentTop="true"
+        android:background="@color/drawer_background">
 
         <LinearLayout
             android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
 
             <LinearLayout
+                android:id="@+id/nav_actions"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:orientation="vertical"
-                android:paddingStart="16dp"
-                android:paddingEnd="16dp">
+                android:orientation="vertical">
 
                 <TextView
                     android:id="@+id/nav_account_summary"
index 0b00bf98bc147ff4bdb59c607ea378dba20b4113..6bf02667210374af01993c11049c2d7da028f233 100644 (file)
@@ -4,4 +4,5 @@
     <color name="colorPrimaryDark">#4a148c</color>
     <color name="colorAccent">#4db6ac</color>
     <color name="table_row_even_bg">#289d29b1</color>
+    <color name="drawer_background">#ffffffff</color>
 </resources>
index 7d26c558cea1a639ab6111f9a5b3aaa809baea0e..cbd324f203ef92626d2ece88ee8904c11e82fc4a 100644 (file)
@@ -24,6 +24,8 @@
         <item name="android:drawablePadding">32dp</item>
         <item name="android:focusable">auto</item>
         <item name="android:gravity">center_vertical|start</item>
+        <item name="android:paddingStart">@dimen/activity_horizontal_margin</item>
+        <item name="android:paddingEnd">@dimen/activity_horizontal_margin</item>
         <item name="android:textAppearance">@style/TextAppearance.AppCompat.Body1</item>
     </style>