]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/content_new_transaction.xml
rework theme color spectrum to match the holy grail violet and get a darker yellow...
[mobile-ledger.git] / app / src / main / res / layout / content_new_transaction.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3   ~ Copyright © 2019 Damyan Ivanov.
4   ~ This file is part of MoLe.
5   ~ MoLe is free software: you can distribute it and/or modify it
6   ~ under the term of the GNU General Public License as published by
7   ~ the Free Software Foundation, either version 3 of the License, or
8   ~ (at your opinion), any later version.
9   ~
10   ~ MoLe is distributed in the hope that it will be useful,
11   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
12   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13   ~ GNU General Public License terms for details.
14   ~
15   ~ You should have received a copy of the GNU General Public License
16   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
17   -->
18
19 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
20     xmlns:app="http://schemas.android.com/apk/res-auto"
21     xmlns:tools="http://schemas.android.com/tools"
22     android:layout_width="match_parent"
23     android:layout_height="match_parent"
24     app:layout_behavior="@string/appbar_scrolling_view_behavior"
25     tools:context=".ui.activity.NewTransactionActivity"
26     tools:showIn="@layout/activity_new_transaction">
27
28     <ScrollView
29         android:id="@+id/transaction_details"
30         android:layout_width="match_parent"
31         android:layout_height="0dp"
32         app:layout_constraintEnd_toEndOf="parent"
33         app:layout_constraintStart_toStartOf="parent"
34         app:layout_constraintTop_toTopOf="parent">
35
36         <LinearLayout
37             android:layout_width="match_parent"
38             android:layout_height="wrap_content"
39             android:orientation="vertical">
40
41             <androidx.constraintlayout.widget.ConstraintLayout
42                 android:layout_width="match_parent"
43                 android:layout_height="match_parent">
44
45                 <EditText
46                     android:id="@+id/new_transaction_date"
47                     android:layout_width="94dp"
48                     android:layout_height="0dp"
49                     android:accessibilityTraversalBefore="@+id/new_transaction_description"
50                     android:ems="10"
51                     android:foregroundGravity="bottom"
52                     android:gravity="bottom"
53                     android:hint="@string/new_transaction_date_hint"
54                     android:imeOptions="actionNext"
55                     android:inputType="date"
56                     android:nextFocusDown="@+id/new_transaction_acc_1"
57                     android:nextFocusForward="@+id/new_transaction_description"
58                     android:onClick="pickTransactionDate"
59                     android:textAlignment="center"
60                     app:layout_constrainedHeight="true"
61                     app:layout_constraintBottom_toBottomOf="parent"
62                     app:layout_constraintHorizontal_weight="8"
63                     app:layout_constraintStart_toStartOf="parent"
64                     app:layout_constraintTop_toTopOf="parent" />
65
66                 <AutoCompleteTextView
67                     android:id="@+id/new_transaction_description"
68                     android:layout_width="0dp"
69                     android:layout_height="wrap_content"
70                     android:layout_marginStart="8dp"
71                     android:accessibilityTraversalAfter="@+id/new_transaction_date"
72                     android:accessibilityTraversalBefore="@+id/new_transaction_acc_1"
73                     android:ems="10"
74                     android:hint="@string/new_transaction_description_hint"
75                     android:imeOptions="actionNext"
76                     android:nextFocusLeft="@+id/new_transaction_date"
77                     android:nextFocusRight="@+id/new_transaction_acc_1"
78                     android:nextFocusUp="@+id/new_transaction_date"
79                     android:nextFocusDown="@+id/new_transaction_acc_1"
80                     android:nextFocusForward="@+id/new_transaction_acc_1"
81                     android:singleLine="true"
82                     app:layout_constraintEnd_toEndOf="parent"
83                     app:layout_constraintHorizontal_weight="30"
84                     app:layout_constraintStart_toEndOf="@+id/new_transaction_date"
85                     app:layout_constraintTop_toTopOf="parent" />
86             </androidx.constraintlayout.widget.ConstraintLayout>
87
88             <TableLayout
89                 android:id="@+id/new_transaction_accounts_table"
90                 android:animateLayoutChanges="true"
91                 android:layout_width="match_parent"
92                 android:layout_height="match_parent">
93
94                 <TableRow
95                     android:layout_width="match_parent"
96                     android:layout_height="match_parent">
97
98                     <AutoCompleteTextView
99                         android:id="@+id/new_transaction_acc_1"
100                         android:layout_width="match_parent"
101                         android:layout_height="wrap_content"
102                         android:layout_gravity="bottom"
103                         android:layout_weight="9"
104                         android:width="0dp"
105                         android:accessibilityTraversalAfter="@+id/new_transaction_description"
106                         android:accessibilityTraversalBefore="@+id/new_transaction_amt_1"
107                         android:hint="@string/new_transaction_account_hint"
108                         android:imeOptions="actionNext"
109                         android:nextFocusLeft="@+id/new_transaction_description"
110                         android:nextFocusRight="@+id/new_transaction_amt_1"
111                         android:nextFocusUp="@+id/new_transaction_description"
112                         android:nextFocusDown="@+id/new_transaction_amt_1"
113                         android:nextFocusForward="@+id/new_transaction_amt_1"
114                         android:singleLine="true" />
115
116                     <EditText
117                         android:id="@+id/new_transaction_amt_1"
118                         android:layout_width="wrap_content"
119                         android:layout_height="match_parent"
120                         android:layout_gravity="bottom"
121                         android:layout_weight="1"
122                         android:width="0dp"
123                         android:hint="@string/new_transaction_amount_hint"
124                         android:imeOptions="actionNext"
125                         android:inputType="numberDecimal|numberSigned"
126                         android:minWidth="40dp"
127                         android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
128                         android:accessibilityTraversalBefore="@+id/new_transaction_acc_2"
129                         android:nextFocusLeft="@+id/new_transaction_acc_1"
130                         android:nextFocusRight="@+id/new_transaction_acc_2"
131                         android:nextFocusUp="@+id/new_transaction_acc_1"
132                         android:nextFocusDown="@+id/new_transaction_acc_2"
133                         android:nextFocusForward="@+id/new_transaction_acc_2"
134                         android:textAlignment="viewEnd" />
135                 </TableRow>
136
137                 <TableRow
138                     android:layout_width="match_parent"
139                     android:layout_height="match_parent">
140
141                     <AutoCompleteTextView
142                         android:id="@+id/new_transaction_acc_2"
143                         android:layout_width="match_parent"
144                         android:layout_height="wrap_content"
145                         android:layout_gravity="bottom"
146                         android:layout_weight="9"
147                         android:width="0dp"
148                         android:accessibilityTraversalAfter="@+id/new_transaction_amt_1"
149                         android:accessibilityTraversalBefore="@+id/new_transaction_amt_2"
150                         android:hint="@string/new_transaction_account_hint"
151                         android:imeOptions="actionNext"
152                         android:nextFocusLeft="@+id/new_transaction_amt_1"
153                         android:nextFocusRight="@+id/new_transaction_amt_2"
154                         android:nextFocusUp="@+id/new_transaction_acc_1"
155                         android:nextFocusDown="@+id/new_transaction_amt_2"
156                         android:nextFocusForward="@+id/new_transaction_amt_2"
157                         android:singleLine="true" />
158
159                     <EditText
160                         android:id="@+id/new_transaction_amt_2"
161                         android:layout_width="wrap_content"
162                         android:layout_height="match_parent"
163                         android:layout_gravity="bottom"
164                         android:layout_weight="1"
165                         android:width="0dp"
166                         android:hint="@string/new_transaction_amount_hint"
167                         android:imeOptions="actionDone"
168                         android:inputType="numberDecimal|numberSigned"
169                         android:minWidth="40dp"
170                         android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
171                         android:nextFocusLeft="@+id/new_transaction_acc_2"
172                         android:nextFocusUp="@+id/new_transaction_amt_1"
173                         android:textAlignment="viewEnd" />
174                 </TableRow>
175
176             </TableLayout>
177
178             <FrameLayout
179                 android:layout_width="match_parent"
180                 android:layout_height="80dp"
181                 android:background="@android:color/transparent">
182
183             </FrameLayout>
184
185         </LinearLayout>
186     </ScrollView>
187
188 </androidx.constraintlayout.widget.ConstraintLayout>