]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/transaction_list_row.xml
e2d0013287a2782bbd9a32089acac8b2de0f9ef8
[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 <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     <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_marginHorizontal="@dimen/activity_horizontal_margin"
33         android:layout_marginVertical="1dp"
34         android:visibility="visible"
35         app:cardCornerRadius="4dp"
36         app:cardElevation="2dp"
37         app:cardUseCompatPadding="false"
38         >
39
40         <androidx.constraintlayout.widget.ConstraintLayout
41             android:id="@+id/transaction_row"
42             android:layout_width="match_parent"
43             android:layout_height="wrap_content"
44             android:gravity="center_vertical"
45             android:minHeight="36dp"
46             android:orientation="horizontal"
47             android:padding="8dp">
48
49             <LinearLayout
50                 android:id="@+id/transaction_row_head"
51                 android:layout_width="match_parent"
52                 android:layout_height="wrap_content"
53                 android:orientation="vertical"
54                 app:layout_constraintEnd_toEndOf="parent"
55                 app:layout_constraintStart_toStartOf="parent"
56                 app:layout_constraintTop_toTopOf="parent">
57
58                 <TextView
59                     android:id="@+id/transaction_row_description"
60                     style="@style/account_summary_account_name"
61                     android:layout_width="match_parent"
62                     android:layout_height="wrap_content"
63                     android:text="---."
64                     android:textAppearance="@android:style/TextAppearance.Material.Medium"
65                     tools:ignore="HardcodedText"
66                     />
67                 <TextView
68                     android:id="@+id/transaction_comment"
69                     android:layout_width="match_parent"
70                     android:layout_height="wrap_content"
71                     android:layout_marginStart="8dp"
72                     android:text="Comment text"
73                     android:textStyle="italic"
74                     tools:ignore="HardcodedText"
75                     />
76             </LinearLayout>
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_marginTop="8dp"
83                 android:layout_weight="5"
84                 android:orientation="vertical"
85                 app:layout_constraintEnd_toEndOf="parent"
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
95         </androidx.constraintlayout.widget.ConstraintLayout>
96     </com.google.android.material.card.MaterialCardView>
97
98     <androidx.constraintlayout.widget.ConstraintLayout
99         android:id="@+id/transaction_delimiter"
100         android:layout_width="match_parent"
101         android:layout_height="wrap_content"
102         android:layout_marginStart="8dp"
103         android:layout_marginTop="16dp"
104         android:layout_marginEnd="8dp">
105
106         <TextView
107             android:id="@+id/transaction_delimiter_month"
108             android:layout_width="wrap_content"
109             android:layout_height="match_parent"
110             android:layout_marginHorizontal="4dp"
111             android:text="---------"
112             android:textColor="?colorPrimary"
113             android:textStyle="bold"
114             app:layout_constraintEnd_toEndOf="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:layout_marginHorizontal="4dp"
122             android:text="--.--.----"
123             android:textColor="?colorPrimary"
124             android:textStyle="bold"
125             app:layout_constraintStart_toStartOf="parent"
126             tools:ignore="HardcodedText" />
127
128         <View
129             android:id="@+id/transaction_delimiter_thick"
130             android:layout_width="0dp"
131             android:layout_height="1dp"
132             android:layout_marginHorizontal="16dp"
133             android:background="?colorPrimary"
134             app:layout_constraintBottom_toBottomOf="parent"
135             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_month"
136             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_date"
137             app:layout_constraintTop_toTopOf="parent"
138             />
139
140     </androidx.constraintlayout.widget.ConstraintLayout>
141
142 </FrameLayout>