]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/transaction_list_row.xml
transaction list: replace table layout with linear one
[mobile-ledger.git] / app / src / main / res / layout / transaction_list_row.xml
index 8a950efd6e2a19c2a143beaed6a0720437a855af..e35c331ba16276b569c3366c962e2c45bc2ae167 100644 (file)
@@ -18,8 +18,9 @@
   ~ along with Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
   -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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"
     android:id="@+id/transaction_row"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:minHeight="36dp"
     android:orientation="horizontal"
     android:paddingStart="8dp"
-    android:paddingEnd="8dp"
-    tools:showIn="@layout/transaction_list_fragment">
+    android:paddingEnd="8dp">
 
     <!--android:button="@drawable/checkbox_star_black"-->
 
     <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."
         tools:ignore="HardcodedText" />
 
-    <TableLayout
+    <LinearLayout
         android:id="@+id/transaction_row_acc_amounts"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent">
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_weight="5"
+        android:orientation="vertical"
+        app:layout_constraintTop_toBottomOf="@id/transaction_row_description">
 
-        <TableRow>
+        <LinearLayout
+            android:id="@+id/account_row_account_row"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingStart="8dp"
+            android:paddingEnd="8dp">
 
             <TextView
-                style="@style/account_summary_amounts"
-                android:text="Sample account name"
-                tools:ignore="HardcodedText" />
-
-            <TextView
-                style="@style/account_summary_amounts"
-                android:text="123,45\n678,90"
-                tools:ignore="HardcodedText" />
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/account_summary_amounts"
-                android:text="Sample account name"
+                android:id="@+id/account_row_acc_name"
+                style="@style/account_summary_account_name"
+                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."
                 tools:ignore="HardcodedText" />
 
             <TextView
+                android:id="@+id/account_row_acc_amounts"
                 style="@style/account_summary_amounts"
                 android:text="123,45\n678,90"
                 tools:ignore="HardcodedText" />
-        </TableRow>
-    </TableLayout>
-</LinearLayout>
\ No newline at end of file
+        </LinearLayout>
+    </LinearLayout>
+</android.support.constraint.ConstraintLayout>
\ No newline at end of file