From 303e1b9f5ae6b9516eb57e1c8469e177872b655f Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 10 Nov 2019 19:34:07 +0200 Subject: [PATCH] auto select new transaction description/amounts upon focus --- .../ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java | 1 - app/src/main/res/layout/new_transaction_row.xml | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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" />