1 <?xml version="1.0" encoding="utf-8"?>
3 ~ Copyright © 2018 Damyan Ivanov.
4 ~ This file is part of Mobile-Ledger.
5 ~ Mobile-Ledger 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.
10 ~ Mobile-Ledger 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.
15 ~ You should have received a copy of the GNU General Public License
16 ~ along with Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
19 <android.support.constraint.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">
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">
37 android:layout_width="match_parent"
38 android:layout_height="wrap_content"
39 android:orientation="vertical">
41 <android.support.constraint.ConstraintLayout
42 android:layout_width="match_parent"
43 android:layout_height="match_parent">
46 android:id="@+id/new_transaction_date"
47 android:layout_width="94dp"
48 android:layout_height="0dp"
49 android:accessibilityTraversalBefore="@+id/new_transaction_description"
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" />
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"
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 </android.support.constraint.ConstraintLayout>
89 android:id="@+id/new_transaction_accounts_table"
90 android:layout_width="match_parent"
91 android:layout_height="match_parent">
94 android:layout_width="match_parent"
95 android:layout_height="match_parent">
98 android:id="@+id/new_transaction_acc_1"
99 android:layout_width="match_parent"
100 android:layout_height="wrap_content"
101 android:layout_gravity="bottom"
102 android:layout_weight="9"
104 android:accessibilityTraversalAfter="@+id/new_transaction_description"
105 android:accessibilityTraversalBefore="@+id/new_transaction_amt_1"
106 android:hint="@string/new_transaction_account_hint"
107 android:imeOptions="actionNext"
108 android:nextFocusLeft="@+id/new_transaction_description"
109 android:nextFocusRight="@+id/new_transaction_amt_1"
110 android:nextFocusUp="@+id/new_transaction_description"
111 android:nextFocusDown="@+id/new_transaction_amt_1"
112 android:nextFocusForward="@+id/new_transaction_amt_1"
113 android:singleLine="true" />
116 android:id="@+id/new_transaction_amt_1"
117 android:layout_width="wrap_content"
118 android:layout_height="match_parent"
119 android:layout_gravity="bottom"
120 android:layout_weight="1"
122 android:hint="@string/new_transaction_amount_hint"
123 android:imeOptions="actionNext"
124 android:inputType="numberDecimal|numberSigned"
125 android:minWidth="40dp"
126 android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
127 android:accessibilityTraversalBefore="@+id/new_transaction_acc_2"
128 android:nextFocusLeft="@+id/new_transaction_acc_1"
129 android:nextFocusRight="@+id/new_transaction_acc_2"
130 android:nextFocusUp="@+id/new_transaction_acc_1"
131 android:nextFocusDown="@+id/new_transaction_acc_2"
132 android:nextFocusForward="@+id/new_transaction_acc_2"
133 android:textAlignment="viewEnd" />
137 android:layout_width="match_parent"
138 android:layout_height="match_parent">
140 <AutoCompleteTextView
141 android:id="@+id/new_transaction_acc_2"
142 android:layout_width="match_parent"
143 android:layout_height="wrap_content"
144 android:layout_gravity="bottom"
145 android:layout_weight="9"
147 android:accessibilityTraversalAfter="@+id/new_transaction_amt_1"
148 android:accessibilityTraversalBefore="@+id/new_transaction_amt_2"
149 android:hint="@string/new_transaction_account_hint"
150 android:imeOptions="actionNext"
151 android:nextFocusLeft="@+id/new_transaction_amt_1"
152 android:nextFocusRight="@+id/new_transaction_amt_2"
153 android:nextFocusUp="@+id/new_transaction_acc_1"
154 android:nextFocusDown="@+id/new_transaction_amt_2"
155 android:nextFocusForward="@+id/new_transaction_amt_2"
156 android:singleLine="true" />
159 android:id="@+id/new_transaction_amt_2"
160 android:layout_width="wrap_content"
161 android:layout_height="match_parent"
162 android:layout_gravity="bottom"
163 android:layout_weight="1"
165 android:hint="@string/new_transaction_amount_hint"
166 android:imeOptions="actionDone"
167 android:inputType="numberDecimal|numberSigned"
168 android:minWidth="40dp"
169 android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
170 android:nextFocusLeft="@+id/new_transaction_acc_2"
171 android:nextFocusUp="@+id/new_transaction_amt_1"
172 android:textAlignment="viewEnd" />
180 </android.support.constraint.ConstraintLayout>