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