]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/transaction_list_row.xml
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / res / layout / transaction_list_row.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   ~ Copyright © 2021 Damyan Ivanov.
5   ~ This file is part of MoLe.
6   ~ MoLe is free software: you can distribute it and/or modify it
7   ~ under the term of the GNU General Public License as published by
8   ~ the Free Software Foundation, either version 3 of the License, or
9   ~ (at your opinion), any later version.
10   ~
11   ~ MoLe is distributed in the hope that it will be useful,
12   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
13   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   ~ GNU General Public License terms for details.
15   ~
16   ~ You should have received a copy of the GNU General Public License
17   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
18   -->
19
20 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
21     xmlns:app="http://schemas.android.com/apk/res-auto"
22     xmlns:tools="http://schemas.android.com/tools"
23     android:layout_width="match_parent"
24     android:layout_height="wrap_content"
25     >
26
27     <com.google.android.material.card.MaterialCardView
28         android:id="@+id/transaction_card_view"
29         style="@style/Widget.MaterialComponents.CardView"
30         android:layout_width="match_parent"
31         android:layout_height="wrap_content"
32         android:layout_margin="8dp"
33         android:visibility="visible"
34         app:cardCornerRadius="0dp"
35         app:cardElevation="2dp"
36         app:cardUseCompatPadding="false"
37         >
38
39         <androidx.constraintlayout.widget.ConstraintLayout
40             android:id="@+id/transaction_row"
41             android:layout_width="match_parent"
42             android:layout_height="wrap_content"
43             android:gravity="center_vertical"
44             android:minHeight="36dp"
45             android:padding="8dp"
46             >
47
48             <LinearLayout
49                 android:id="@+id/transaction_row_head"
50                 android:layout_width="0dp"
51                 android:layout_height="wrap_content"
52                 android:orientation="vertical"
53                 app:layout_constraintEnd_toEndOf="parent"
54                 app:layout_constraintStart_toStartOf="parent"
55                 app:layout_constraintTop_toTopOf="parent"
56                 >
57
58                 <TextView
59                     android:id="@+id/transaction_row_description"
60                     android:layout_width="match_parent"
61                     android:layout_height="wrap_content"
62                     android:text="---."
63                     android:textAppearance="@android:style/TextAppearance.Material.Medium"
64                     android:textStyle="bold"
65                     tools:ignore="HardcodedText"
66                     />
67                 <TextView
68                     android:id="@+id/transaction_comment"
69                     style="@style/transaction_list_comment"
70                     android:layout_width="match_parent"
71                     android:layout_height="wrap_content"
72                     android:layout_marginStart="0dp"
73                     android:layout_marginTop="0dp"
74                     android:text="Comment text"
75                     tools:ignore="HardcodedText"
76                     />
77             </LinearLayout>
78
79             <LinearLayout
80                 android:id="@+id/transaction_row_acc_amounts"
81                 android:layout_width="0dp"
82                 android:layout_height="wrap_content"
83                 android:layout_marginTop="8dp"
84                 android:orientation="vertical"
85                 app:layout_constraintEnd_toStartOf="@id/transaction_running_total"
86                 app:layout_constraintStart_toStartOf="parent"
87                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_head"
88                 >
89
90                 <include layout="@layout/transaction_list_row_accounts_table_row" />
91                 <include layout="@layout/transaction_list_row_accounts_table_row" />
92
93             </LinearLayout>
94             <androidx.constraintlayout.widget.Barrier
95                 android:id="@+id/barrier"
96                 android:layout_width="match_parent"
97                 android:layout_height="wrap_content"
98                 app:barrierDirection="top"
99                 app:constraint_referenced_ids="transaction_row_acc_amounts,transaction_running_total"
100                 />
101
102             <TextView
103                 android:id="@+id/transaction_running_total"
104                 style="@style/transaction_list_comment"
105                 android:layout_width="wrap_content"
106                 android:layout_height="wrap_content"
107                 android:layout_marginStart="@dimen/half_text_margin"
108                 android:gravity="bottom|end"
109                 android:text="one two"
110                 android:visibility="visible"
111                 app:layout_constraintBottom_toBottomOf="@id/transaction_row_acc_amounts"
112                 app:layout_constraintEnd_toEndOf="parent"
113                 app:layout_constraintStart_toEndOf="@id/transaction_row_acc_amounts"
114                 app:layout_goneMarginStart="0dp"
115                 />
116             <View
117                 android:id="@+id/transaction_running_total_divider"
118                 android:layout_width="1dp"
119                 android:layout_height="0dp"
120                 android:layout_marginStart="@dimen/quarter_text_margin"
121                 android:background="?commentColor"
122                 app:layout_constraintBottom_toBottomOf="@id/transaction_running_total"
123                 app:layout_constraintStart_toEndOf="@id/transaction_row_acc_amounts"
124                 app:layout_constraintTop_toBottomOf="@id/barrier"
125                 app:layout_goneMarginStart="0dp"
126                 />
127
128         </androidx.constraintlayout.widget.ConstraintLayout>
129     </com.google.android.material.card.MaterialCardView>
130
131
132 </FrameLayout>