]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/transaction_list_row.xml
unneeded id
[mobile-ledger.git] / app / src / main / res / layout / transaction_list_row.xml
index a31faad07c48b3b0f86f72e95d7329703585a247..a9e6c9b7ca578025f971540d04d76d770bc83381 100644 (file)
@@ -19,8 +19,8 @@
   -->
 
 <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/transaction_row"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
 
     <!--android:button="@drawable/checkbox_star_black"-->
 
-    <TextView
-        android:id="@+id/transaction_row_description"
-        style="@style/account_summary_account_name"
-        android:layout_width="0dp"
+    <LinearLayout
+        android:id="@+id/transaction_row_head"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_weight="5"
-        android:text="Sample description goes here."
-        tools:ignore="HardcodedText" />
+        android:orientation="horizontal"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent">
+
+        <TextView
+            android:id="@+id/transaction_row_description"
+            style="@style/account_summary_account_name"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="5"
+            android:text="Sample description goes here."
+            android:textStyle="bold"
+            tools:ignore="HardcodedText" />
+
+        <TextView
+            android:id="@+id/transaction_row_date"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="0dp"
+            app:layout_constraintEnd_toEndOf="parent" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/transaction_row_header_border"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/dashed_border_1dp"
+        android:minHeight="2dp"
+        android:orientation="horizontal"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/transaction_row_head" />
 
-    <TableLayout
+    <LinearLayout
         android:id="@+id/transaction_row_acc_amounts"
-        android:layout_width="0dp"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
         android:layout_weight="5"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintStart_toEndOf="@id/transaction_row_description">
+        android:orientation="vertical"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/transaction_row_header_border">
 
-        <TableRow>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="8dp"
+            android:paddingEnd="0dp">
 
             <TextView
-                style="@style/account_summary_amounts"
-                android:text="Sample account name"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="5"
+                android:text="Account name, a really long one. A very very very long one. It may even spawn on more than two lines -- three, four or more."
+                android:textAlignment="viewStart"
                 tools:ignore="HardcodedText" />
 
             <TextView
-                style="@style/account_summary_amounts"
-                android:text="123,45\n678,90"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="0dp"
+                android:minWidth="60dp"
+                android:text="123,45\n-14 678,90"
+                android:textAlignment="viewEnd"
                 tools:ignore="HardcodedText" />
-        </TableRow>
+        </LinearLayout>
 
-        <TableRow>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="8dp"
+            android:paddingEnd="0dp">
 
             <TextView
-                style="@style/account_summary_amounts"
-                android:text="Sample account name"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="5"
+                android:text="Account name, a really long one. A very very very long one. It may even spawn on more than two lines -- three, four or more."
+                android:textAlignment="viewStart"
                 tools:ignore="HardcodedText" />
 
             <TextView
-                style="@style/account_summary_amounts"
-                android:text="123,45\n678,90"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="0dp"
+                android:minWidth="60dp"
+                android:text="123,45\n-14 678,90"
+                android:textAlignment="viewEnd"
                 tools:ignore="HardcodedText" />
-        </TableRow>
-    </TableLayout>
+        </LinearLayout>
+    </LinearLayout>
 </android.support.constraint.ConstraintLayout>
\ No newline at end of file