]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/new_transaction_row.xml
rework new transaction activity with a RecyclerView
[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:ems="10"
37             android:foregroundGravity="bottom"
38             android:gravity="bottom"
39             android:hint="@string/new_transaction_date_hint"
40             android:imeOptions="actionNext"
41             android:cursorVisible="false"
42             android:textCursorDrawable="@android:color/transparent"
43             android:inputType="date"
44             android:nextFocusDown="@+id/new_transaction_acc_1"
45             android:nextFocusForward="@+id/new_transaction_description"
46             android:textAlignment="center"
47             android:enabled="true"
48             app:layout_constrainedHeight="true"
49             app:layout_constraintBottom_toBottomOf="parent"
50             app:layout_constraintHorizontal_weight="8"
51             app:layout_constraintStart_toStartOf="parent"
52             app:layout_constraintTop_toTopOf="parent" />
53
54         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
55             android:id="@+id/new_transaction_description"
56             android:layout_width="0dp"
57             android:layout_height="wrap_content"
58             android:layout_marginStart="8dp"
59             android:accessibilityTraversalAfter="@+id/new_transaction_date"
60             android:ems="10"
61             android:hint="@string/new_transaction_description_hint"
62             android:imeOptions="actionNext"
63             android:inputType="text"
64             android:nextFocusLeft="@+id/new_transaction_date"
65             android:nextFocusUp="@+id/new_transaction_date"
66             android:singleLine="true"
67             app:layout_constraintEnd_toEndOf="parent"
68             app:layout_constraintHorizontal_weight="30"
69             app:layout_constraintStart_toEndOf="@+id/new_transaction_date"
70             app:layout_constraintTop_toTopOf="parent" />
71     </androidx.constraintlayout.widget.ConstraintLayout>
72
73     <LinearLayout
74         android:id="@+id/ntr_account"
75         android:layout_width="match_parent"
76         android:layout_height="wrap_content"
77         android:orientation="horizontal">
78
79
80         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
81             android:id="@+id/account_row_acc_name"
82             android:layout_width="0dp"
83             android:layout_height="wrap_content"
84             android:layout_weight="9"
85             android:hint="@string/new_transaction_account_hint"
86             android:inputType="text"
87             android:imeOptions="actionNext"
88             android:singleLine="true"
89             android:width="0dp" />
90
91         <EditText
92             android:id="@+id/account_row_acc_amounts"
93             android:layout_width="wrap_content"
94             android:layout_height="wrap_content"
95             android:layout_gravity="bottom|end"
96             android:layout_weight="0"
97             android:width="0dp"
98             android:foregroundGravity="bottom"
99             android:gravity="bottom|end"
100             android:hint="0.00"
101             android:inputType="numberSigned|numberDecimal"
102             android:minWidth="60sp"
103             android:textAlignment="viewEnd"
104             android:selectAllOnFocus="true"
105             tools:ignore="HardcodedText"
106             android:imeOptions="actionNext"/>
107
108     </LinearLayout>
109
110     <FrameLayout
111         android:id="@+id/ntr_padding"
112         android:layout_width="match_parent"
113         android:layout_height="80dp"
114         android:minHeight="80dp">
115
116     </FrameLayout>
117
118 </LinearLayout>