]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/account_summary_row.xml
put account expansion bracket after the name, fix rotation animation
[mobile-ledger.git] / app / src / main / res / layout / account_summary_row.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3
4 <!--
5   ~ Copyright © 2019 Damyan Ivanov.
6   ~ This file is part of MoLe.
7   ~ MoLe is free software: you can distribute it and/or modify it
8   ~ under the term of the GNU General Public License as published by
9   ~ the Free Software Foundation, either version 3 of the License, or
10   ~ (at your opinion), any later version.
11   ~
12   ~ MoLe is distributed in the hope that it will be useful,
13   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
14   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15   ~ GNU General Public License terms for details.
16   ~
17   ~ You should have received a copy of the GNU General Public License
18   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
19   -->
20
21 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
22     xmlns:app="http://schemas.android.com/apk/res-auto"
23     xmlns:tools="http://schemas.android.com/tools"
24     android:id="@+id/account_summary_row"
25     android:layout_width="match_parent"
26     android:layout_height="wrap_content">
27
28     <CheckBox
29         android:id="@+id/account_row_check"
30         android:layout_width="wrap_content"
31         android:layout_height="match_parent"
32         android:button="@drawable/checkbox_star_black"
33         android:onClick="onAccountSummaryRowViewClicked"
34         app:layout_constraintBottom_toBottomOf="parent"
35         app:layout_constraintStart_toStartOf="parent"
36         app:layout_constraintTop_toTopOf="parent" />
37
38     <TextView
39         android:id="@+id/account_row_acc_name"
40         style="@style/account_summary_account_name"
41         android:layout_width="wrap_content"
42         android:layout_height="0dp"
43         android:layout_weight="1"
44         android:gravity="center_vertical"
45         android:onClick="onAccountSummaryRowViewClicked"
46         android:paddingStart="8dp"
47         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."
48         app:layout_constraintBottom_toBottomOf="parent"
49         app:layout_constraintStart_toEndOf="@id/account_row_check"
50         app:layout_constraintTop_toTopOf="parent"
51         tools:ignore="HardcodedText" />
52
53     <FrameLayout
54         android:id="@+id/account_expander_container"
55         android:layout_width="@dimen/thumb_row_height"
56         android:layout_height="@dimen/thumb_row_height"
57         android:foregroundGravity="center_vertical"
58         android:minHeight="@dimen/thumb_row_height"
59         android:onClick="onAccountSummaryRowViewClicked"
60         app:layout_constraintBottom_toBottomOf="parent"
61         app:layout_constraintStart_toEndOf="@id/account_row_acc_name"
62         app:layout_constraintTop_toTopOf="parent">
63
64         <ImageView
65             android:id="@+id/account_expander"
66             android:layout_width="match_parent"
67             android:layout_height="match_parent"
68             android:layout_margin="8dp"
69             android:background="@drawable/ic_expand_less_black_24dp" />
70     </FrameLayout>
71
72     <TextView
73         android:id="@+id/account_row_filler1"
74         android:layout_width="0dp"
75         android:layout_height="match_parent"
76         app:layout_constraintBottom_toBottomOf="parent"
77         app:layout_constraintEnd_toStartOf="@id/account_row_acc_amounts"
78         app:layout_constraintStart_toEndOf="@id/account_expander_container"
79         app:layout_constraintTop_toTopOf="parent" />
80
81     <TextView
82         android:id="@+id/account_row_acc_amounts"
83         style="@style/account_summary_amounts"
84         android:layout_width="wrap_content"
85         android:layout_height="wrap_content"
86         android:layout_marginEnd="8dp"
87         android:layout_weight="0"
88         android:gravity="center_vertical"
89         android:onClick="onAccountSummaryRowViewClicked"
90         android:text="123,45\n678,90"
91         app:layout_constraintBottom_toBottomOf="parent"
92         app:layout_constraintEnd_toEndOf="parent"
93         app:layout_constraintTop_toTopOf="parent"
94         tools:ignore="HardcodedText" />
95
96     <View
97         android:id="@+id/account_summary_trailer"
98         android:layout_width="match_parent"
99         android:layout_height="80dp"
100         app:layout_constraintBottom_toBottomOf="parent"
101         app:layout_constraintEnd_toEndOf="parent"
102         app:layout_constraintStart_toStartOf="parent"
103         app:layout_constraintTop_toTopOf="parent" />
104 </androidx.constraintlayout.widget.ConstraintLayout>