]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/new_transaction_row.xml
add calendar drawable to the date input of the new transaction activity
[mobile-ledger.git] / app / src / main / res / layout / new_transaction_row.xml
1 <?xml version="1.0" encoding="utf-8"?><!--
2   ~ Copyright © 2019 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 <LinearLayout 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="wrap_content"
23     android:animateLayoutChanges="false"
24     android:orientation="vertical">
25
26     <androidx.constraintlayout.widget.ConstraintLayout
27         android:id="@+id/ntr_data"
28         android:layout_width="match_parent"
29         android:layout_height="wrap_content">
30
31         <EditText
32             android:id="@+id/new_transaction_date"
33             android:layout_width="94dp"
34             android:layout_height="0dp"
35             android:accessibilityTraversalBefore="@+id/new_transaction_description"
36             android:drawableStart="@drawable/ic_event_gray_24dp"
37             android:ems="10"
38             android:foregroundGravity="bottom"
39             android:gravity="bottom"
40             android:hint="@string/new_transaction_date_hint"
41             android:imeOptions="actionNext"
42             android:cursorVisible="false"
43             android:textCursorDrawable="@android:color/transparent"
44             android:inputType="date"
45             android:nextFocusDown="@+id/new_transaction_acc_1"
46             android:nextFocusForward="@+id/new_transaction_description"
47             android:textAlignment="center"
48             android:enabled="true"
49             app:layout_constrainedHeight="true"
50             app:layout_constraintBottom_toBottomOf="parent"
51             app:layout_constraintHorizontal_weight="8"
52             app:layout_constraintStart_toStartOf="parent"
53             app:layout_constraintTop_toTopOf="parent" />
54
55         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
56             android:id="@+id/new_transaction_description"
57             android:layout_width="0dp"
58             android:layout_height="wrap_content"
59             android:layout_marginStart="8dp"
60             android:accessibilityTraversalAfter="@+id/new_transaction_date"
61             android:ems="10"
62             android:hint="@string/new_transaction_description_hint"
63             android:imeOptions="actionNext"
64             android:inputType="text"
65             android:nextFocusLeft="@+id/new_transaction_date"
66             android:nextFocusUp="@+id/new_transaction_date"
67             android:selectAllOnFocus="true"
68             android:singleLine="true"
69             app:layout_constraintEnd_toEndOf="parent"
70             app:layout_constraintHorizontal_weight="30"
71             app:layout_constraintStart_toEndOf="@+id/new_transaction_date"
72             app:layout_constraintTop_toTopOf="parent" />
73     </androidx.constraintlayout.widget.ConstraintLayout>
74
75     <LinearLayout
76         android:id="@+id/ntr_account"
77         android:layout_width="match_parent"
78         android:layout_height="wrap_content"
79         android:orientation="horizontal">
80
81
82         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
83             android:id="@+id/account_row_acc_name"
84             android:layout_width="0dp"
85             android:layout_height="wrap_content"
86             android:layout_weight="9"
87             android:hint="@string/new_transaction_account_hint"
88             android:inputType="text"
89             android:imeOptions="actionNext"
90             android:singleLine="true"
91             android:selectAllOnFocus="true"
92             android:width="0dp" />
93
94         <EditText
95             android:id="@+id/account_row_acc_amounts"
96             android:layout_width="wrap_content"
97             android:layout_height="wrap_content"
98             android:layout_gravity="bottom|end"
99             android:layout_weight="0"
100             android:width="0dp"
101             android:foregroundGravity="bottom"
102             android:gravity="bottom|end"
103             android:hint="@string/zero_amount"
104             android:inputType="numberSigned|numberDecimal|number"
105             android:minWidth="70sp"
106             android:textAlignment="viewEnd"
107             android:selectAllOnFocus="true"
108             android:imeOptions="actionNext"/>
109
110     </LinearLayout>
111
112     <FrameLayout
113         android:id="@+id/ntr_padding"
114         android:layout_width="match_parent"
115         android:layout_height="80dp"
116         android:minHeight="80dp">
117
118     </FrameLayout>
119
120 </LinearLayout>