]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/fragment_currency_selector_list.xml
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / res / layout / fragment_currency_selector_list.xml
1 <?xml version="1.0" encoding="utf-8"?><!--
2   ~ Copyright © 2020 Damyan Ivanov.
3   ~ This file is part of MoLe.
4   ~ MoLe is free software: you can distribute it and/or modify it
5   ~ under the term of the GNU General Public License as published by
6   ~ the Free Software Foundation, either version 3 of the License, or
7   ~ (at your opinion), any later version.
8   ~
9   ~ MoLe is distributed in the hope that it will be useful,
10   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   ~ GNU General Public License terms for details.
13   ~
14   ~ You should have received a copy of the GNU General Public License
15   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
16   -->
17
18 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
19     xmlns:app="http://schemas.android.com/apk/res-auto"
20     xmlns:tools="http://schemas.android.com/tools"
21     android:layout_width="match_parent"
22     android:layout_height="match_parent"
23     android:animateLayoutChanges="true"
24     android:minWidth="60dp"
25     android:padding="@dimen/text_margin"
26     app:layout_constraintWidth_min="60dp"
27     >
28
29     <com.google.android.material.textview.MaterialTextView
30         android:id="@+id/label"
31         android:layout_width="wrap_content"
32         android:layout_height="wrap_content"
33         android:layout_marginBottom="@dimen/text_margin"
34         android:text="@string/choose_currency_label"
35         android:textSize="18sp"
36         app:layout_constraintBottom_toTopOf="@id/list"
37         app:layout_constraintEnd_toEndOf="parent"
38         app:layout_constraintStart_toStartOf="parent"
39         app:layout_constraintTop_toTopOf="parent"
40         />
41
42     <androidx.recyclerview.widget.RecyclerView
43         android:id="@+id/list"
44         android:name="net.ktnx.mobileledger.ui.CurrencySelectorFragment"
45         android:layout_width="wrap_content"
46         android:layout_height="200dp"
47         android:minHeight="100dp"
48         android:layout_marginLeft="@dimen/activity_horizontal_margin"
49         android:layout_marginRight="@dimen/activity_horizontal_margin"
50         app:layoutManager="LinearLayoutManager"
51         app:layout_constraintBottom_toTopOf="@id/new_currency_panel"
52         app:layout_constraintEnd_toEndOf="parent"
53         app:layout_constraintStart_toStartOf="parent"
54         app:layout_constraintTop_toBottomOf="@id/label"
55         tools:context="net.ktnx.mobileledger.ui.CurrencySelectorFragment"
56         tools:listitem="@layout/fragment_currency_selector"
57         >
58
59     </androidx.recyclerview.widget.RecyclerView>
60
61     <androidx.constraintlayout.widget.ConstraintLayout
62         android:id="@+id/new_currency_panel"
63         android:layout_width="wrap_content"
64         android:layout_height="wrap_content"
65         android:layout_marginLeft="@dimen/activity_horizontal_margin"
66         android:layout_marginRight="@dimen/activity_horizontal_margin"
67         app:layout_constraintBottom_toTopOf="@id/params_panel"
68         app:layout_constraintEnd_toEndOf="parent"
69         app:layout_constraintStart_toStartOf="parent"
70         app:layout_constraintTop_toBottomOf="@id/list"
71         >
72
73         <TextView
74             android:id="@+id/btn_add_new"
75             style="@style/Widget.MaterialComponents.Button.TextButton"
76             android:layout_width="wrap_content"
77             android:layout_height="wrap_content"
78             android:layout_margin="@dimen/text_margin"
79             android:text="@string/add_button"
80             app:layout_constraintBottom_toBottomOf="parent"
81             app:layout_constraintEnd_toEndOf="parent"
82             app:layout_constraintStart_toEndOf="@id/btn_no_currency"
83             app:layout_constraintTop_toTopOf="parent"
84             />
85         <TextView
86             android:id="@+id/btn_no_currency"
87             style="@style/Widget.MaterialComponents.Button.TextButton"
88             android:layout_width="wrap_content"
89             android:layout_height="wrap_content"
90             android:layout_margin="@dimen/text_margin"
91             android:text="@string/btn_no_currency"
92             app:layout_constraintBottom_toBottomOf="parent"
93             app:layout_constraintEnd_toStartOf="@id/btn_add_new"
94             app:layout_constraintStart_toStartOf="parent"
95             app:layout_constraintTop_toTopOf="parent"
96             />
97
98         <EditText
99             android:id="@+id/new_currency_name"
100             android:layout_width="wrap_content"
101             android:layout_height="wrap_content"
102             android:hint="@string/new_currency_name_hint"
103             android:inputType="text"
104             android:singleLine="true"
105             android:text=""
106             android:visibility="invisible"
107             app:layout_constraintEnd_toEndOf="parent"
108             app:layout_constraintStart_toStartOf="parent"
109             app:layout_constraintTop_toTopOf="parent"
110             android:autofillHints="currency"
111             />
112
113         <TextView
114             android:id="@+id/btn_add_currency"
115             style="@style/Widget.MaterialComponents.Button.TextButton"
116             android:layout_width="wrap_content"
117             android:layout_height="wrap_content"
118             android:layout_margin="@dimen/text_margin"
119             android:text="@string/add_button"
120             app:layout_constraintBottom_toBottomOf="parent"
121             app:layout_constraintEnd_toEndOf="parent"
122             app:layout_constraintTop_toBottomOf="@id/new_currency_name"
123             />
124     </androidx.constraintlayout.widget.ConstraintLayout>
125
126     <androidx.constraintlayout.widget.ConstraintLayout
127         android:id="@+id/params_panel"
128         android:layout_width="wrap_content"
129         android:layout_height="wrap_content"
130         app:layout_constraintBottom_toBottomOf="parent"
131         app:layout_constraintEnd_toEndOf="parent"
132         app:layout_constraintStart_toStartOf="parent"
133         app:layout_constraintTop_toBottomOf="@id/new_currency_panel"
134         >
135
136         <RadioGroup
137             android:id="@+id/position_radio_group"
138             android:layout_width="match_parent"
139             android:layout_height="wrap_content"
140             android:layout_marginBottom="@dimen/text_margin"
141             android:orientation="horizontal"
142             app:layout_constraintBottom_toTopOf="@id/currency_gap"
143             app:layout_constraintEnd_toEndOf="parent"
144             app:layout_constraintStart_toStartOf="parent"
145             app:layout_constraintTop_toTopOf="parent"
146             >
147
148             <RadioButton
149                 android:id="@+id/currency_position_left"
150                 android:layout_width="wrap_content"
151                 android:layout_height="wrap_content"
152                 android:layout_weight="1"
153                 android:text="@string/currency_position_left"
154                 />
155
156             <RadioButton
157                 android:id="@+id/currency_position_right"
158                 android:layout_width="wrap_content"
159                 android:layout_height="wrap_content"
160                 android:layout_weight="1"
161                 android:text="@string/currency_position_right"
162                 />
163         </RadioGroup>
164
165         <com.google.android.material.switchmaterial.SwitchMaterial
166             android:id="@+id/currency_gap"
167             android:layout_width="match_parent"
168             android:layout_height="wrap_content"
169             android:text="@string/currency_has_gap"
170             app:layout_constraintBottom_toBottomOf="parent"
171             app:layout_constraintEnd_toEndOf="parent"
172             app:layout_constraintStart_toStartOf="parent"
173             app:layout_constraintTop_toBottomOf="@id/position_radio_group"
174             />
175
176     </androidx.constraintlayout.widget.ConstraintLayout>
177
178 </androidx.constraintlayout.widget.ConstraintLayout>