]> git.ktnx.net Git - mobile-ledger.git/commitdiff
transaction list: make day/month markers more visible
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 15 Jan 2019 20:28:55 +0000 (20:28 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 15 Jan 2019 20:28:55 +0000 (20:28 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java
app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java
app/src/main/res/layout/transaction_list_row.xml

index 88d043a6fe6988a587901119ecebfc9a20ce5fae..573fd15c0c09ce9fffb62b60f2dbb9ba59aa65df 100644 (file)
@@ -81,11 +81,15 @@ public class TransactionListAdapter extends RecyclerView.Adapter<TransactionRowH
             if (item.isMonthShown()) {
                 holder.tvDelimiterMonth.setText(Globals.monthNames[date.getMonth()]);
                 holder.tvDelimiterMonth.setVisibility(View.VISIBLE);
-                holder.vDelimiterLine.setBackgroundResource(R.drawable.dashed_border_8dp);
+//                holder.vDelimiterLine.setBackgroundResource(R.drawable.dashed_border_8dp);
+                holder.vDelimiterLine.setVisibility(View.GONE);
+                holder.vDelimiterThick.setVisibility(View.VISIBLE);
             }
             else {
                 holder.tvDelimiterMonth.setVisibility(View.GONE);
-                holder.vDelimiterLine.setBackgroundResource(R.drawable.dashed_border_1dp);
+//                holder.vDelimiterLine.setBackgroundResource(R.drawable.dashed_border_1dp);
+                holder.vDelimiterLine.setVisibility(View.VISIBLE);
+                holder.vDelimiterThick.setVisibility(View.GONE);
             }
         }
     }
index 91111a6fea991e74f8a731ea37f9f21ea23bf5e8..7baba8fa38c6e6fbf617fee821e9418eaf9d15b7 100644 (file)
@@ -34,7 +34,7 @@ class TransactionRowHolder extends RecyclerView.ViewHolder {
     ConstraintLayout vDelimiter;
     CardView vTransaction;
     TextView tvDelimiterMonth, tvDelimiterDate;
-    View vDelimiterLine;
+    View vDelimiterLine, vDelimiterThick;
     public TransactionRowHolder(@NonNull View itemView) {
         super(itemView);
         this.row = itemView.findViewById(R.id.transaction_row);
@@ -45,5 +45,6 @@ class TransactionRowHolder extends RecyclerView.ViewHolder {
         this.tvDelimiterDate = itemView.findViewById(R.id.transaction_delimiter_date);
         this.tvDelimiterMonth = itemView.findViewById(R.id.transaction_delimiter_month);
         this.vDelimiterLine = itemView.findViewById(R.id.transaction_delimiter_line);
+        this.vDelimiterThick = itemView.findViewById(R.id.transaction_delimiter_thick);
     }
 }
index f82cf48ce21c5ad30deedac73371be6dde24e0e1..b8fa0a5b834f72c6f9927a24725d64dd7d7f7dd0 100644 (file)
             android:id="@+id/transaction_delimiter_month"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
+            android:background="@color/colorPrimary"
+            android:paddingStart="4dp"
+            android:paddingEnd="4dp"
             android:text="---------"
-            android:textColor="@color/header_border"
+            android:textColor="@android:color/white"
             android:textStyle="bold"
             app:layout_constraintStart_toStartOf="parent"
             tools:ignore="HardcodedText" />
             android:id="@+id/transaction_delimiter_date"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
+            android:background="@color/colorPrimary"
+            android:paddingStart="4dp"
+            android:paddingEnd="4dp"
             android:text="--.--.----"
-            android:textColor="@color/header_border"
+            android:textColor="@android:color/white"
             android:textStyle="bold"
             app:layout_constraintEnd_toEndOf="parent"
             tools:ignore="HardcodedText" />
         <View
             android:id="@+id/transaction_delimiter_line"
             android:layout_width="0dp"
-            android:layout_height="0dp"
+            android:layout_height="16dp"
             android:layout_marginStart="8dp"
             android:layout_marginEnd="8dp"
             android:background="@drawable/dashed_border_1dp"
             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
             app:layout_constraintTop_toTopOf="parent" />
 
+        <View
+            android:id="@+id/transaction_delimiter_thick"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:background="@color/colorPrimary"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
+            app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
+            app:layout_constraintTop_toTopOf="parent" />
+
     </android.support.constraint.ConstraintLayout>
 </android.support.v7.widget.ContentFrameLayout>
\ No newline at end of file