]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/account_summary_row.xml
"final" fixes on account list layout
[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 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
21     android:layout_width="match_parent"
22     android:layout_height="wrap_content"
23     >
24
25     <androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
26         xmlns:tools="http://schemas.android.com/tools"
27         android:id="@+id/account_summary_row"
28         android:layout_width="match_parent"
29         android:layout_height="wrap_content"
30         android:longClickable="true"
31         android:minHeight="@dimen/thumb_row_height"
32         >
33         <androidx.constraintlayout.widget.ConstraintLayout
34             android:id="@+id/account_name_layout"
35             android:layout_width="0dp"
36             android:layout_height="wrap_content"
37             app:layout_constraintBottom_toBottomOf="parent"
38             app:layout_constraintEnd_toStartOf="@+id/account_row_acc_amounts"
39             app:layout_constraintHorizontal_chainStyle="spread_inside"
40             app:layout_constraintHorizontal_weight="3"
41             app:layout_constraintStart_toStartOf="parent"
42             app:layout_constraintTop_toTopOf="parent"
43             >
44             <TextView
45                 android:id="@+id/account_row_acc_name"
46                 style="@style/account_summary_account_name"
47                 android:layout_width="wrap_content"
48                 android:layout_height="wrap_content"
49                 android:layout_marginStart="8dp"
50                 android:gravity="center_vertical"
51                 android:longClickable="true"
52                 android:onClick="onAccountSummaryRowViewClicked"
53                 android:paddingStart="8dp"
54                 android:text="AccountNameALongOne"
55                 android:textAppearance="@android:style/TextAppearance.Material.Medium"
56                 app:layout_constrainedWidth="true"
57                 app:layout_constraintBottom_toBottomOf="parent"
58                 app:layout_constraintEnd_toStartOf="@id/account_expander_container"
59                 app:layout_constraintHorizontal_bias="0.0"
60                 app:layout_constraintHorizontal_chainStyle="packed"
61                 app:layout_constraintStart_toStartOf="parent"
62                 app:layout_constraintTop_toTopOf="parent"
63                 app:layout_constraintWidth_max="wrap"
64                 app:layout_constraintWidth_percent=".67"
65                 tools:ignore="HardcodedText"
66                 />
67
68             <androidx.constraintlayout.widget.ConstraintLayout
69                 android:id="@+id/account_expander_container"
70                 android:layout_width="@dimen/thumb_row_height"
71                 android:layout_height="@dimen/thumb_row_height"
72                 android:foregroundGravity="center_vertical"
73                 android:minHeight="@dimen/thumb_row_height"
74                 android:onClick="onAccountSummaryRowViewClicked"
75                 app:layout_constraintBottom_toBottomOf="@id/account_row_acc_name"
76                 app:layout_constraintEnd_toEndOf="parent"
77                 app:layout_constraintStart_toEndOf="@id/account_row_acc_name"
78                 app:layout_constraintTop_toTopOf="@id/account_row_acc_name"
79                 >
80
81                 <ImageView
82                     android:id="@+id/account_expander"
83                     android:layout_width="32dp"
84                     android:layout_height="32dp"
85                     android:background="@drawable/ic_expand_less_black_24dp"
86                     android:clickable="true"
87                     android:onClick="onAccountSummaryRowViewClicked"
88                     app:layout_constraintBottom_toBottomOf="parent"
89                     app:layout_constraintEnd_toEndOf="parent"
90                     app:layout_constraintStart_toStartOf="parent"
91                     app:layout_constraintTop_toTopOf="parent"
92                     />
93             </androidx.constraintlayout.widget.ConstraintLayout>
94         </androidx.constraintlayout.widget.ConstraintLayout>
95         <TextView
96             android:id="@+id/account_row_acc_amounts"
97             style="@style/account_summary_amounts"
98             android:layout_width="0dp"
99             android:layout_height="wrap_content"
100             android:layout_marginStart="12dp"
101             android:layout_marginEnd="8dp"
102             android:gravity="center_vertical"
103             android:onClick="onAccountSummaryRowViewClicked"
104             android:text="USD 123,45\n678,90\nIRAUSD -17 000.00"
105             android:textAppearance="@style/TextAppearance.AppCompat.Medium"
106             app:layout_constrainedWidth="true"
107             app:layout_constraintBottom_toBottomOf="parent"
108             app:layout_constraintEnd_toEndOf="parent"
109             app:layout_constraintHorizontal_weight="2"
110             app:layout_constraintStart_toEndOf="@id/account_name_layout"
111             app:layout_constraintTop_toTopOf="parent"
112             app:layout_constraintWidth_min="90sp"
113             tools:ignore="HardcodedText"
114             />
115
116         <FrameLayout
117             android:id="@+id/account_row_amounts_expander_container"
118             android:layout_width="0dp"
119             android:layout_height="18sp"
120             android:background="@drawable/fade_down_white"
121             app:layout_constraintBottom_toBottomOf="@id/account_row_acc_amounts"
122             app:layout_constraintEnd_toEndOf="@id/account_row_acc_amounts"
123             app:layout_constraintStart_toStartOf="@id/account_row_acc_amounts"
124             >
125
126         </FrameLayout>
127
128     </androidx.constraintlayout.widget.ConstraintLayout>
129     <View
130         android:id="@+id/account_summary_trailer"
131         android:layout_width="match_parent"
132         android:layout_height="80dp"
133         />
134 </FrameLayout>