]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/transaction_list_row.xml
46391a2c89273c2053c6b44dc47c5dd7a2c73d64
[mobile-ledger.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 <androidx.appcompat.widget.ContentFrameLayout 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     <androidx.cardview.widget.CardView
27         android:id="@+id/transaction_card_view"
28         android:layout_width="match_parent"
29         android:layout_height="wrap_content"
30         android:layout_margin="8dp"
31         android:visibility="visible"
32         app:cardCornerRadius="16dp"
33         app:cardElevation="4dp"
34         app:cardUseCompatPadding="false"
35         app:layout_constraintEnd_toEndOf="parent"
36         app:layout_constraintStart_toStartOf="parent"
37         app:layout_goneMarginBottom="8dp">
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:orientation="horizontal"
46             android:padding="8dp">
47
48             <LinearLayout
49                 android:id="@+id/transaction_row_head"
50                 android:layout_width="match_parent"
51                 android:layout_height="wrap_content"
52                 android:orientation="horizontal"
53                 app:layout_constraintEnd_toEndOf="parent"
54                 app:layout_constraintStart_toStartOf="parent"
55                 app:layout_constraintTop_toTopOf="parent">
56
57                 <TextView
58                     android:id="@+id/transaction_row_description"
59                     style="@style/account_summary_account_name"
60                     android:layout_width="0dp"
61                     android:layout_height="wrap_content"
62                     android:layout_weight="5"
63                     android:text="---."
64                     android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
65                     tools:ignore="HardcodedText" />
66
67             </LinearLayout>
68
69             <LinearLayout
70                 android:id="@+id/transaction_row_header_border"
71                 android:layout_width="match_parent"
72                 android:layout_height="wrap_content"
73                 android:alpha="0.3"
74                 android:background="@drawable/dashed_border_1dp"
75                 android:minHeight="2dp"
76                 android:orientation="horizontal"
77                 app:layout_constraintEnd_toEndOf="parent"
78                 app:layout_constraintStart_toStartOf="parent"
79                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_head" />
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_weight="5"
86                 android:orientation="vertical"
87                 app:layout_constraintEnd_toEndOf="parent"
88                 app:layout_constraintStart_toStartOf="parent"
89                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_header_border">
90
91                 <include layout="@layout/transaction_list_row_accounts_table_row"/>
92                 <include layout="@layout/transaction_list_row_accounts_table_row"/>
93
94             </LinearLayout>
95
96         </androidx.constraintlayout.widget.ConstraintLayout>
97     </androidx.cardview.widget.CardView>
98
99     <androidx.constraintlayout.widget.ConstraintLayout
100         android:id="@+id/transaction_delimiter"
101         android:layout_width="match_parent"
102         android:layout_height="wrap_content"
103         android:layout_marginStart="8dp"
104         android:layout_marginTop="16dp"
105         android:layout_marginEnd="8dp"
106         android:foregroundGravity="center_vertical"
107         android:orientation="horizontal">
108
109         <TextView
110             android:id="@+id/transaction_delimiter_month"
111             android:layout_width="wrap_content"
112             android:layout_height="match_parent"
113             android:background="?colorPrimary"
114             android:paddingStart="4dp"
115             android:paddingEnd="4dp"
116             android:text="---------"
117             android:textColor="@android:color/white"
118             android:textStyle="bold"
119             app:layout_constraintStart_toStartOf="parent"
120             tools:ignore="HardcodedText" />
121
122         <TextView
123             android:id="@+id/transaction_delimiter_date"
124             android:layout_width="wrap_content"
125             android:layout_height="match_parent"
126             android:background="?colorPrimary"
127             android:paddingStart="4dp"
128             android:paddingEnd="4dp"
129             android:text="--.--.----"
130             android:textColor="@android:color/white"
131             android:textStyle="bold"
132             app:layout_constraintEnd_toEndOf="parent"
133             tools:ignore="HardcodedText" />
134
135         <View
136             android:id="@+id/transaction_delimiter_line"
137             android:layout_width="0dp"
138             android:layout_height="16dp"
139             android:layout_marginStart="8dp"
140             android:layout_marginEnd="8dp"
141             android:alpha="0.3"
142             android:background="@drawable/dashed_border_1dp"
143             app:layout_constraintBottom_toBottomOf="parent"
144             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
145             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
146             app:layout_constraintTop_toTopOf="parent" />
147
148         <View
149             android:id="@+id/transaction_delimiter_thick"
150             android:layout_width="0dp"
151             android:layout_height="0dp"
152             android:background="?colorPrimary"
153             app:layout_constraintBottom_toBottomOf="parent"
154             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
155             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
156             app:layout_constraintTop_toTopOf="parent" />
157
158     </androidx.constraintlayout.widget.ConstraintLayout>
159
160 </androidx.appcompat.widget.ContentFrameLayout>