From: Damyan Ivanov Date: Sun, 10 Nov 2019 17:34:07 +0000 (+0200) Subject: auto select new transaction description/amounts upon focus X-Git-Tag: v0.11.0~89 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=303e1b9f5ae6b9516eb57e1c8469e177872b655f;p=mobile-ledger.git auto select new transaction description/amounts upon focus --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java index 3198cc16..4bf75d00 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java @@ -158,7 +158,6 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder case transactionRow: tvAccount.requestFocus(); tvAccount.dismissDropDown(); - tvAccount.selectAll(); break; } } diff --git a/app/src/main/res/layout/new_transaction_row.xml b/app/src/main/res/layout/new_transaction_row.xml index 2356e5ca..9491ba7b 100644 --- a/app/src/main/res/layout/new_transaction_row.xml +++ b/app/src/main/res/layout/new_transaction_row.xml @@ -63,6 +63,7 @@ android:inputType="text" android:nextFocusLeft="@+id/new_transaction_date" android:nextFocusUp="@+id/new_transaction_date" + android:selectAllOnFocus="true" android:singleLine="true" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_weight="30" @@ -86,6 +87,7 @@ android:inputType="text" android:imeOptions="actionNext" android:singleLine="true" + android:selectAllOnFocus="true" android:width="0dp" />