]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/account_summary_row.xml
overly long commodity lists fade to white and expand/collapse on click
[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:longClickable="true"
27     android:layout_height="wrap_content">
28
29     <CheckBox
30         android:id="@+id/account_row_check"
31         android:layout_width="wrap_content"
32         android:layout_height="match_parent"
33         android:button="@drawable/checkbox_star_black"
34         android:onClick="onAccountSummaryRowViewClicked"
35         app:layout_constraintBottom_toBottomOf="parent"
36         app:layout_constraintStart_toStartOf="parent"
37         app:layout_constraintTop_toTopOf="parent" />
38
39     <TextView
40         android:id="@+id/account_row_acc_name"
41         style="@style/account_summary_account_name"
42         android:layout_width="wrap_content"
43         android:layout_height="0dp"
44         android:layout_weight="1"
45         android:gravity="center_vertical"
46         android:onClick="onAccountSummaryRowViewClicked"
47         android:paddingStart="8dp"
48         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."
49         app:layout_constraintBottom_toBottomOf="parent"
50         app:layout_constraintStart_toEndOf="@id/account_row_check"
51         app:layout_constraintTop_toTopOf="parent"
52         tools:ignore="HardcodedText" />
53
54     <FrameLayout
55         android:id="@+id/account_expander_container"
56         android:layout_width="@dimen/thumb_row_height"
57         android:layout_height="@dimen/thumb_row_height"
58         android:foregroundGravity="center_vertical"
59         android:minHeight="@dimen/thumb_row_height"
60         android:onClick="onAccountSummaryRowViewClicked"
61         app:layout_constraintBottom_toBottomOf="parent"
62         app:layout_constraintStart_toEndOf="@id/account_row_acc_name"
63         app:layout_constraintTop_toTopOf="parent">
64
65         <ImageView
66             android:id="@+id/account_expander"
67             android:layout_width="match_parent"
68             android:layout_height="match_parent"
69             android:layout_margin="8dp"
70             android:background="@drawable/ic_expand_less_black_24dp" />
71     </FrameLayout>
72
73     <TextView
74         android:id="@+id/account_row_filler1"
75         android:layout_width="0dp"
76         android:layout_height="match_parent"
77         app:layout_constraintBottom_toBottomOf="parent"
78         app:layout_constraintEnd_toStartOf="@id/account_row_acc_amounts"
79         app:layout_constraintStart_toEndOf="@id/account_expander_container"
80         app:layout_constraintTop_toTopOf="parent" />
81
82     <TextView
83         android:id="@+id/account_row_acc_amounts"
84         style="@style/account_summary_amounts"
85         android:layout_width="wrap_content"
86         android:layout_height="wrap_content"
87         android:layout_marginEnd="8dp"
88         android:layout_weight="0"
89         android:gravity="center_vertical"
90         android:minWidth="@dimen/thumb_row_height"
91         android:onClick="onAccountSummaryRowViewClicked"
92         android:text="123,45\n678,90"
93         app:layout_constraintBottom_toBottomOf="parent"
94         app:layout_constraintEnd_toEndOf="parent"
95         app:layout_constraintTop_toTopOf="parent"
96         tools:ignore="HardcodedText" />
97
98     <FrameLayout
99         android:id="@+id/account_row_amounts_expander_container"
100         android:layout_width="0dp"
101         android:layout_height="12sp"
102         app:layout_constraintStart_toStartOf="@id/account_row_acc_amounts"
103         app:layout_constraintEnd_toEndOf="@id/account_row_acc_amounts"
104         app:layout_constraintBottom_toBottomOf="@id/account_row_acc_amounts"
105         android:background="@drawable/fade_down_white">
106
107         <!--<ImageView-->
108             <!--android:layout_gravity="center_vertical|end"-->
109             <!--android:id="@+id/account_row_amounts_expander"-->
110             <!--android:layout_width="20dp"-->
111             <!--android:layout_height="20dp"-->
112             <!--android:background="@drawable/ic_expand_more_black_24dp" />-->
113
114     </FrameLayout>
115
116     <View
117         android:id="@+id/account_summary_trailer"
118         android:layout_width="match_parent"
119         android:layout_height="80dp"
120         app:layout_constraintBottom_toBottomOf="parent"
121         app:layout_constraintEnd_toEndOf="parent"
122         app:layout_constraintStart_toStartOf="parent"
123         app:layout_constraintTop_toTopOf="parent" />
124 </androidx.constraintlayout.widget.ConstraintLayout>