]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/fragment_currency_selector_list.xml
drop unneeded ems setting in several layouts
[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:minWidth="60dp"
24     android:animateLayoutChanges="true"
25     app:layout_constraintWidth_min="60dp"
26     android:padding="@dimen/text_margin">
27
28     <com.google.android.material.textview.MaterialTextView
29         android:id="@+id/label"
30         android:layout_width="wrap_content"
31         android:layout_height="wrap_content"
32         android:layout_marginBottom="@dimen/text_margin"
33         android:text="@string/choose_currency_label"
34         android:textSize="18sp"
35         app:layout_constraintEnd_toEndOf="parent"
36         app:layout_constraintStart_toStartOf="parent"
37         app:layout_constraintTop_toTopOf="parent" />
38
39     <androidx.recyclerview.widget.RecyclerView
40         android:id="@+id/list"
41         android:name="net.ktnx.mobileledger.ui.CurrencySelectorFragment"
42         android:layout_width="wrap_content"
43         android:layout_height="wrap_content"
44         android:layout_marginLeft="@dimen/activity_horizontal_margin"
45         android:layout_marginRight="@dimen/activity_horizontal_margin"
46         app:layoutManager="LinearLayoutManager"
47         app:layout_constraintBottom_toTopOf="@id/new_currency_panel"
48         app:layout_constraintEnd_toEndOf="parent"
49         app:layout_constraintStart_toStartOf="parent"
50         app:layout_constraintTop_toBottomOf="@id/label"
51         tools:context="net.ktnx.mobileledger.ui.CurrencySelectorFragment"
52         tools:listitem="@layout/fragment_currency_selector">
53
54     </androidx.recyclerview.widget.RecyclerView>
55
56     <androidx.constraintlayout.widget.ConstraintLayout
57         android:id="@+id/new_currency_panel"
58         android:layout_width="wrap_content"
59         android:layout_height="wrap_content"
60         android:layout_marginLeft="@dimen/activity_horizontal_margin"
61         android:layout_marginRight="@dimen/activity_horizontal_margin"
62         app:layout_constraintTop_toBottomOf="@id/list"
63         app:layout_constraintBottom_toTopOf="@id/params_panel"
64         app:layout_constraintEnd_toEndOf="parent"
65         app:layout_constraintStart_toStartOf="parent">
66
67         <TextView
68             android:id="@+id/btn_add_new"
69             style="@style/Widget.MaterialComponents.Button.TextButton"
70             android:layout_width="wrap_content"
71             android:layout_height="wrap_content"
72             android:text="@string/add_button"
73             android:layout_margin="@dimen/text_margin"
74             app:layout_constraintBottom_toBottomOf="parent"
75             app:layout_constraintEnd_toEndOf="parent"
76             app:layout_constraintStart_toEndOf="@id/btn_no_currency"
77             app:layout_constraintTop_toTopOf="parent" />
78         <TextView
79             android:layout_width="wrap_content"
80             android:layout_height="wrap_content"
81             android:id="@+id/btn_no_currency"
82             android:text="@string/btn_no_currency"
83             style="@style/Widget.MaterialComponents.Button.TextButton"
84             app:layout_constraintBottom_toBottomOf="parent"
85             app:layout_constraintTop_toTopOf="parent"
86             app:layout_constraintStart_toStartOf="parent"
87             app:layout_constraintEnd_toStartOf="@id/btn_add_new"
88             android:layout_margin="@dimen/text_margin"/>
89
90         <EditText
91             android:id="@+id/new_currency_name"
92             android:layout_width="wrap_content"
93             android:layout_height="wrap_content"
94             android:hint="@string/new_currency_name_hint"
95             android:inputType="text"
96             android:singleLine="true"
97             android:text=""
98             android:visibility="invisible"
99             app:layout_constraintEnd_toEndOf="parent"
100             app:layout_constraintStart_toStartOf="parent"
101             app:layout_constraintTop_toTopOf="parent" />
102
103         <TextView
104             android:id="@+id/btn_add_currency"
105             style="@style/Widget.MaterialComponents.Button.TextButton"
106             android:layout_width="wrap_content"
107             android:layout_height="wrap_content"
108             android:layout_margin="@dimen/text_margin"
109             android:text="@string/add_button"
110             app:layout_constraintBottom_toBottomOf="parent"
111             app:layout_constraintEnd_toEndOf="parent"
112             app:layout_constraintTop_toBottomOf="@id/new_currency_name" />
113     </androidx.constraintlayout.widget.ConstraintLayout>
114
115     <androidx.constraintlayout.widget.ConstraintLayout
116         android:layout_width="wrap_content"
117         android:layout_height="wrap_content"
118         android:id="@+id/params_panel"
119         app:layout_constraintStart_toStartOf="parent"
120         app:layout_constraintEnd_toEndOf="parent"
121         app:layout_constraintBottom_toBottomOf="parent"
122         app:layout_constraintTop_toBottomOf="@id/new_currency_panel">
123
124         <RadioGroup
125             android:id="@+id/position_radio_group"
126             android:layout_width="match_parent"
127             android:layout_height="wrap_content"
128             app:layout_constraintTop_toTopOf="parent"
129             app:layout_constraintStart_toStartOf="parent"
130             app:layout_constraintEnd_toEndOf="parent"
131             android:orientation="horizontal"
132             app:layout_constraintBottom_toTopOf="@id/currency_gap"
133             android:layout_marginBottom="@dimen/text_margin"
134             >
135
136             <RadioButton
137                 android:id="@+id/currency_position_left"
138                 android:layout_width="wrap_content"
139                 android:layout_height="wrap_content"
140                 android:layout_weight="1"
141                 android:text="@string/currency_position_left" />
142
143             <RadioButton
144                 android:id="@+id/currency_position_right"
145                 android:layout_width="wrap_content"
146                 android:layout_height="wrap_content"
147                 android:layout_weight="1"
148                 android:text="@string/currency_position_right" />
149         </RadioGroup>
150
151         <Switch
152             android:id="@+id/currency_gap"
153             android:layout_width="match_parent"
154             android:layout_height="wrap_content"
155             android:text="@string/currency_has_gap"
156             app:layout_constraintTop_toBottomOf="@id/position_radio_group"
157             app:layout_constraintStart_toStartOf="parent"
158             app:layout_constraintEnd_toEndOf="parent"
159             app:layout_constraintBottom_toBottomOf="parent"/>
160
161     </androidx.constraintlayout.widget.ConstraintLayout>
162
163 </androidx.constraintlayout.widget.ConstraintLayout>