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