]> git.ktnx.net Git - mobile-ledger-staging.git/blob - app/src/main/res/layout/transaction_list_row.xml
more material styles
[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="@android:style/TextAppearance.Material.Medium"
63                     android:textColor="?textColor"
64                     tools:ignore="HardcodedText" />
65
66             </LinearLayout>
67
68             <View
69                 android:id="@+id/transaction_row_header_border"
70                 android:layout_width="match_parent"
71                 android:layout_height="2dp"
72                 android:alpha="0.3"
73                 android:background="@drawable/dashed_border_1dp"
74                 android:height="2dp"
75                 app:layout_constraintEnd_toEndOf="parent"
76                 app:layout_constraintStart_toStartOf="parent"
77                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_head" />
78
79             <LinearLayout
80                 android:id="@+id/transaction_row_acc_amounts"
81                 android:layout_width="match_parent"
82                 android:layout_height="wrap_content"
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_header_border">
88
89                 <include layout="@layout/transaction_list_row_accounts_table_row"/>
90                 <include layout="@layout/transaction_list_row_accounts_table_row"/>
91
92             </LinearLayout>
93
94         </androidx.constraintlayout.widget.ConstraintLayout>
95     </androidx.cardview.widget.CardView>
96
97     <androidx.constraintlayout.widget.ConstraintLayout
98         android:id="@+id/transaction_delimiter"
99         android:layout_width="match_parent"
100         android:layout_height="wrap_content"
101         android:layout_marginStart="8dp"
102         android:layout_marginTop="16dp"
103         android:layout_marginEnd="8dp">
104
105         <TextView
106             android:id="@+id/transaction_delimiter_month"
107             android:layout_width="wrap_content"
108             android:layout_height="match_parent"
109             android:background="?colorPrimary"
110             android:paddingStart="4dp"
111             android:paddingEnd="4dp"
112             android:text="---------"
113             android:textColor="?android:attr/colorBackground"
114             android:textStyle="bold"
115             app:layout_constraintStart_toStartOf="parent"
116             tools:ignore="HardcodedText" />
117
118         <TextView
119             android:id="@+id/transaction_delimiter_date"
120             android:layout_width="wrap_content"
121             android:layout_height="match_parent"
122             android:background="?colorPrimary"
123             android:paddingStart="4dp"
124             android:paddingEnd="4dp"
125             android:text="--.--.----"
126             android:textColor="?android:attr/colorBackground"
127             android:textStyle="bold"
128             app:layout_constraintEnd_toEndOf="parent"
129             tools:ignore="HardcodedText" />
130
131         <View
132             android:id="@+id/transaction_delimiter_line"
133             android:layout_width="0dp"
134             android:layout_height="16dp"
135             android:layout_marginStart="8dp"
136             android:layout_marginEnd="8dp"
137             android:alpha="0.3"
138             android:background="@drawable/dashed_border_1dp"
139             app:layout_constraintBottom_toBottomOf="parent"
140             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
141             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
142             app:layout_constraintTop_toTopOf="parent" />
143
144         <View
145             android:id="@+id/transaction_delimiter_thick"
146             android:layout_width="0dp"
147             android:layout_height="0dp"
148             android:background="?colorPrimary"
149             app:layout_constraintBottom_toBottomOf="parent"
150             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
151             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
152             app:layout_constraintTop_toTopOf="parent" />
153
154     </androidx.constraintlayout.widget.ConstraintLayout>
155
156 </FrameLayout>