]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/transaction_list_row.xml
major refactor, make account summary and transaction list fragments, part of the...
[mobile-ledger.git] / app / src / main / res / layout / transaction_list_row.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   ~ Copyright © 2018 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.CardView 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     android:layout_margin="8dp"
26     app:cardCornerRadius="16dp"
27     app:cardElevation="4dp"
28     app:cardUseCompatPadding="false"
29     app:layout_constraintEnd_toEndOf="parent"
30     app:layout_constraintStart_toStartOf="parent"
31     app:layout_goneMarginBottom="8dp">
32
33     <android.support.constraint.ConstraintLayout
34         android:id="@+id/transaction_row"
35         android:layout_width="match_parent"
36         android:layout_height="wrap_content"
37         android:gravity="center_vertical"
38         android:minHeight="36dp"
39         android:orientation="horizontal"
40         android:padding="8dp">
41
42         <LinearLayout
43             android:id="@+id/transaction_row_head"
44             android:layout_width="match_parent"
45             android:layout_height="wrap_content"
46             android:orientation="horizontal"
47             app:layout_constraintEnd_toEndOf="parent"
48             app:layout_constraintStart_toStartOf="parent">
49
50             <TextView
51                 android:id="@+id/transaction_row_description"
52                 style="@style/account_summary_account_name"
53                 android:layout_width="0dp"
54                 android:layout_height="wrap_content"
55                 android:layout_weight="5"
56                 android:text="Sample description goes here."
57                 android:textStyle="bold"
58                 tools:ignore="HardcodedText" />
59
60             <TextView
61                 android:id="@+id/transaction_row_date"
62                 android:layout_width="wrap_content"
63                 android:layout_height="wrap_content"
64                 android:layout_marginEnd="0dp"
65                 app:layout_constraintEnd_toEndOf="parent" />
66         </LinearLayout>
67
68         <LinearLayout
69             android:id="@+id/transaction_row_header_border"
70             android:layout_width="match_parent"
71             android:layout_height="wrap_content"
72             android:background="@drawable/dashed_border_1dp"
73             android:minHeight="2dp"
74             android:orientation="horizontal"
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             <LinearLayout
90                 android:layout_width="match_parent"
91                 android:layout_height="wrap_content"
92                 android:gravity="center_vertical"
93                 android:orientation="horizontal"
94                 android:paddingStart="8dp"
95                 android:paddingEnd="0dp">
96
97                 <TextView
98                     android:layout_width="0dp"
99                     android:layout_height="wrap_content"
100                     android:layout_weight="5"
101                     android:text="Account name, a really long one. A very very very long one. It may even spawn on more than two lines -- three, four or more."
102                     android:textAlignment="viewStart"
103                     tools:ignore="HardcodedText" />
104
105                 <TextView
106                     android:layout_width="wrap_content"
107                     android:layout_height="wrap_content"
108                     android:layout_marginEnd="0dp"
109                     android:minWidth="60dp"
110                     android:text="€ 123,45"
111                     android:textAlignment="viewEnd"
112                     tools:ignore="HardcodedText" />
113             </LinearLayout>
114
115             <LinearLayout
116                 android:layout_width="match_parent"
117                 android:layout_height="wrap_content"
118                 android:gravity="center_vertical"
119                 android:orientation="horizontal"
120                 android:paddingStart="8dp"
121                 android:paddingEnd="0dp">
122
123                 <TextView
124                     android:layout_width="0dp"
125                     android:layout_height="wrap_content"
126                     android:layout_weight="5"
127                     android:text="Account name, a really long one. A very very very long one. It may even spawn on more than two lines -- three, four or more."
128                     android:textAlignment="viewStart"
129                     tools:ignore="HardcodedText" />
130
131                 <TextView
132                     android:layout_width="wrap_content"
133                     android:layout_height="wrap_content"
134                     android:layout_marginEnd="0dp"
135                     android:minWidth="60dp"
136                     android:text="-14 678,90"
137                     android:textAlignment="viewEnd"
138                     tools:ignore="HardcodedText" />
139             </LinearLayout>
140         </LinearLayout>
141
142     </android.support.constraint.ConstraintLayout>
143 </android.support.v7.widget.CardView>