From 1865d22b24c7494aa258b9624f7d3c17fc1905c6 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 9 Dec 2018 13:47:15 +0000 Subject: [PATCH] yet another attempt to fix the forward navigation between elements in landscape mode seems to work for the initial entries --- .../res/layout/content_new_transaction.xml | 47 ++++++++++++++++--- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/layout/content_new_transaction.xml b/app/src/main/res/layout/content_new_transaction.xml index 429d1b08..086609d7 100644 --- a/app/src/main/res/layout/content_new_transaction.xml +++ b/app/src/main/res/layout/content_new_transaction.xml @@ -31,7 +31,11 @@ android:layout_height="wrap_content" android:ems="10" android:hint="@string/new_transaction_date_hint" + android:imeOptions="actionNext" android:inputType="date" + android:accessibilityTraversalBefore="@+id/new_transaction_description" + android:nextFocusDown="@+id/new_transaction_acc_1" + android:nextFocusForward="@+id/new_transaction_description" android:onClick="pickTransactionDate" android:textAlignment="center" app:layout_constraintHorizontal_weight="8" @@ -43,9 +47,17 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="8dp" + android:accessibilityTraversalAfter="@+id/new_transaction_date" + android:accessibilityTraversalBefore="@+id/new_transaction_acc_1" android:ems="10" android:hint="@string/new_transaction_description_hint" + android:imeOptions="actionNext" android:inputType="textPersonName" + android:nextFocusLeft="@+id/new_transaction_date" + android:nextFocusRight="@+id/new_transaction_acc_1" + android:nextFocusUp="@+id/new_transaction_date" + android:nextFocusDown="@+id/new_transaction_acc_1" + android:nextFocusForward="@+id/new_transaction_acc_1" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_weight="30" app:layout_constraintStart_toEndOf="@+id/new_transaction_date" @@ -68,10 +80,15 @@ android:layout_gravity="bottom" android:layout_weight="9" android:width="0dp" + android:accessibilityTraversalAfter="@+id/new_transaction_description" + android:accessibilityTraversalBefore="@+id/new_transaction_amt_2" android:hint="@string/new_transaction_account_hint" - android:nextFocusDown="@id/new_transaction_amt_1" - android:nextFocusForward="@id/new_transaction_amt_1" - android:text="This is a sample account name, deliberately long" /> + android:imeOptions="actionNext" + android:nextFocusLeft="@+id/new_transaction_description" + android:nextFocusRight="@+id/new_transaction_amt_1" + android:nextFocusUp="@+id/new_transaction_description" + android:nextFocusDown="@+id/new_transaction_amt_1" + android:nextFocusForward="@+id/new_transaction_amt_1" /> @@ -100,8 +123,14 @@ android:layout_weight="9" android:width="0dp" android:hint="@string/new_transaction_account_hint" - android:nextFocusDown="@id/new_transaction_amt_2" - android:nextFocusForward="@id/new_transaction_amt_2" /> + android:imeOptions="actionNext" + android:accessibilityTraversalAfter="@+id/new_transaction_amt_1" + android:accessibilityTraversalBefore="@+id/new_transaction_amt_2" + android:nextFocusLeft="@+id/new_transaction_amt_1" + android:nextFocusRight="@+id/new_transaction_amt_2" + android:nextFocusUp="@+id/new_transaction_acc_1" + android:nextFocusDown="@+id/new_transaction_amt_2" + android:nextFocusForward="@+id/new_transaction_amt_2" /> -- 2.39.2