]> git.ktnx.net Git - mobile-ledger-staging.git/blob - app/src/main/res/layout/transaction_list_row.xml
6cfe719de829c2927e960f154ba4dfa7ed3dc7cc
[mobile-ledger-staging.git] / app / src / main / res / layout / transaction_list_row.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   ~ Copyright © 2019 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     android:measureAllChildren="false"
26     >
27
28     <com.google.android.material.card.MaterialCardView
29         android:id="@+id/transaction_card_view"
30         style="@style/Widget.MaterialComponents.CardView"
31         android:layout_width="match_parent"
32         android:layout_height="wrap_content"
33         android:layout_marginHorizontal="@dimen/activity_horizontal_margin"
34         android:layout_marginVertical="1dp"
35         android:visibility="visible"
36         app:cardCornerRadius="4dp"
37         app:cardElevation="2dp"
38         app:cardUseCompatPadding="false"
39         >
40
41         <androidx.constraintlayout.widget.ConstraintLayout
42             android:id="@+id/transaction_row"
43             android:layout_width="match_parent"
44             android:layout_height="wrap_content"
45             android:gravity="center_vertical"
46             android:minHeight="36dp"
47             android:orientation="horizontal"
48             android:padding="8dp"
49             >
50
51             <LinearLayout
52                 android:id="@+id/transaction_row_head"
53                 android:layout_width="match_parent"
54                 android:layout_height="wrap_content"
55                 android:orientation="vertical"
56                 app:layout_constraintEnd_toEndOf="parent"
57                 app:layout_constraintStart_toStartOf="parent"
58                 app:layout_constraintTop_toTopOf="parent"
59                 >
60
61                 <TextView
62                     android:id="@+id/transaction_row_description"
63                     style="@style/account_summary_account_name"
64                     android:layout_width="match_parent"
65                     android:layout_height="wrap_content"
66                     android:text="---."
67                     android:textAppearance="@android:style/TextAppearance.Material.Medium"
68                     tools:ignore="HardcodedText"
69                     />
70                 <TextView
71                     android:id="@+id/transaction_comment"
72                     android:layout_width="match_parent"
73                     android:layout_height="wrap_content"
74                     android:layout_marginStart="8dp"
75                     android:text="Comment text"
76                     android:textStyle="italic"
77                     tools:ignore="HardcodedText"
78                     />
79             </LinearLayout>
80
81             <LinearLayout
82                 android:id="@+id/transaction_row_acc_amounts"
83                 android:layout_width="match_parent"
84                 android:layout_height="wrap_content"
85                 android:layout_marginTop="8dp"
86                 android:layout_weight="5"
87                 android:orientation="vertical"
88                 app:layout_constraintEnd_toEndOf="parent"
89                 app:layout_constraintStart_toStartOf="parent"
90                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_head"
91                 >
92
93                 <include layout="@layout/transaction_list_row_accounts_table_row" />
94                 <include layout="@layout/transaction_list_row_accounts_table_row" />
95
96             </LinearLayout>
97
98         </androidx.constraintlayout.widget.ConstraintLayout>
99     </com.google.android.material.card.MaterialCardView>
100
101     <androidx.constraintlayout.widget.ConstraintLayout
102         android:id="@+id/transaction_delimiter"
103         android:layout_width="match_parent"
104         android:layout_height="wrap_content"
105         android:layout_marginStart="8dp"
106         android:layout_marginTop="16dp"
107         android:layout_marginEnd="8dp"
108         >
109
110         <TextView
111             android:id="@+id/transaction_delimiter_month"
112             android:layout_width="wrap_content"
113             android:layout_height="match_parent"
114             android:layout_marginHorizontal="4dp"
115             android:text="---------"
116             android:textColor="?colorPrimary"
117             android:textStyle="bold"
118             app:layout_constraintEnd_toEndOf="parent"
119             tools:ignore="HardcodedText"
120             />
121
122         <TextView
123             android:id="@+id/transaction_delimiter_date"
124             android:layout_width="wrap_content"
125             android:layout_height="match_parent"
126             android:layout_marginHorizontal="4dp"
127             android:text="--.--.----"
128             android:textColor="?colorPrimary"
129             android:textStyle="bold"
130             app:layout_constraintStart_toStartOf="parent"
131             tools:ignore="HardcodedText"
132             />
133
134         <View
135             android:id="@+id/transaction_delimiter_thick"
136             android:layout_width="0dp"
137             android:layout_height="1dp"
138             android:layout_marginHorizontal="16dp"
139             android:background="?colorPrimary"
140             app:layout_constraintBottom_toBottomOf="parent"
141             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_month"
142             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_date"
143             app:layout_constraintTop_toTopOf="parent"
144             />
145
146     </androidx.constraintlayout.widget.ConstraintLayout>
147
148 </FrameLayout>