]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/transaction_list_row.xml
28864be95a189ce54b3ea534720a9ece9ef39264
[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 Mobile-Ledger.
6   ~ Mobile-Ledger 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   ~ Mobile-Ledger 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 Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
18   -->
19
20 <android.support.v7.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     <android.support.v7.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="gone"
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         <android.support.constraint.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:textStyle="bold"
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:background="@drawable/dashed_border_1dp"
74                 android:minHeight="2dp"
75                 android:orientation="horizontal"
76                 app:layout_constraintEnd_toEndOf="parent"
77                 app:layout_constraintStart_toStartOf="parent"
78                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_head" />
79
80             <LinearLayout
81                 android:id="@+id/transaction_row_acc_amounts"
82                 android:layout_width="match_parent"
83                 android:layout_height="wrap_content"
84                 android:layout_weight="5"
85                 android:orientation="vertical"
86                 app:layout_constraintEnd_toEndOf="parent"
87                 app:layout_constraintStart_toStartOf="parent"
88                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_header_border">
89
90                 <LinearLayout
91                     android:layout_width="match_parent"
92                     android:layout_height="wrap_content"
93                     android:gravity="center_vertical"
94                     android:orientation="horizontal"
95                     android:paddingStart="8dp"
96                     android:paddingEnd="0dp">
97
98                     <TextView
99                         android:layout_width="0dp"
100                         android:layout_height="wrap_content"
101                         android:layout_weight="5"
102                         android:text="---"
103                         android:textAlignment="viewStart"
104                         tools:ignore="HardcodedText" />
105
106                     <TextView
107                         android:layout_width="wrap_content"
108                         android:layout_height="wrap_content"
109                         android:layout_marginEnd="0dp"
110                         android:minWidth="60dp"
111                         android:text="€ --,--"
112                         android:textAlignment="viewEnd"
113                         tools:ignore="HardcodedText" />
114                 </LinearLayout>
115
116                 <LinearLayout
117                     android:layout_width="match_parent"
118                     android:layout_height="wrap_content"
119                     android:gravity="center_vertical"
120                     android:orientation="horizontal"
121                     android:paddingStart="8dp"
122                     android:paddingEnd="0dp">
123
124                     <TextView
125                         android:layout_width="0dp"
126                         android:layout_height="wrap_content"
127                         android:layout_weight="5"
128                         android:text="---"
129                         android:textAlignment="viewStart"
130                         tools:ignore="HardcodedText" />
131
132                     <TextView
133                         android:layout_width="wrap_content"
134                         android:layout_height="wrap_content"
135                         android:layout_marginEnd="0dp"
136                         android:minWidth="60dp"
137                         android:text="---,--"
138                         android:textAlignment="viewEnd"
139                         tools:ignore="HardcodedText" />
140                 </LinearLayout>
141             </LinearLayout>
142
143         </android.support.constraint.ConstraintLayout>
144     </android.support.v7.widget.CardView>
145
146     <android.support.constraint.ConstraintLayout
147         android:id="@+id/transaction_delimiter"
148         android:layout_width="match_parent"
149         android:layout_height="wrap_content"
150         android:layout_marginStart="8dp"
151         android:layout_marginTop="16dp"
152         android:layout_marginEnd="8dp"
153         android:foregroundGravity="center_vertical"
154         android:orientation="horizontal">
155
156         <TextView
157             android:id="@+id/transaction_delimiter_month"
158             android:layout_width="wrap_content"
159             android:layout_height="match_parent"
160             android:background="@color/colorPrimary"
161             android:paddingStart="4dp"
162             android:paddingEnd="4dp"
163             android:text="---------"
164             android:textColor="@android:color/white"
165             android:textStyle="bold"
166             app:layout_constraintStart_toStartOf="parent"
167             tools:ignore="HardcodedText" />
168
169         <TextView
170             android:id="@+id/transaction_delimiter_date"
171             android:layout_width="wrap_content"
172             android:layout_height="match_parent"
173             android:background="@color/colorPrimary"
174             android:paddingStart="4dp"
175             android:paddingEnd="4dp"
176             android:text="--.--.----"
177             android:textColor="@android:color/white"
178             android:textStyle="bold"
179             app:layout_constraintEnd_toEndOf="parent"
180             tools:ignore="HardcodedText" />
181
182         <View
183             android:id="@+id/transaction_delimiter_line"
184             android:layout_width="0dp"
185             android:layout_height="16dp"
186             android:layout_marginStart="8dp"
187             android:layout_marginEnd="8dp"
188             android:background="@drawable/dashed_border_1dp"
189             app:layout_constraintBottom_toBottomOf="parent"
190             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
191             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
192             app:layout_constraintTop_toTopOf="parent" />
193
194         <View
195             android:id="@+id/transaction_delimiter_thick"
196             android:layout_width="0dp"
197             android:layout_height="0dp"
198             android:background="@color/colorPrimary"
199             app:layout_constraintBottom_toBottomOf="parent"
200             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
201             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
202             app:layout_constraintTop_toTopOf="parent" />
203
204     </android.support.constraint.ConstraintLayout>
205
206     <view
207         android:id="@+id/transaction_list_trailer"
208         class="android.support.constraint.Placeholder"
209         id="@+id/view"
210         android:layout_width="match_parent"
211         android:layout_height="80dp" />
212 </android.support.v7.widget.ContentFrameLayout>