Show recovery code from top to bottom instead of from left to right
This way it is easier to enter it.
This commit is contained in:
parent
4efaa08881
commit
c6f83647b2
4 changed files with 139 additions and 141 deletions
|
@ -1,6 +1,6 @@
|
|||
package com.stevesoltys.backup.ui.recoverycode
|
||||
|
||||
import android.content.res.Configuration
|
||||
import android.content.res.Configuration.ORIENTATION_LANDSCAPE
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
@ -33,12 +33,10 @@ class RecoveryCodeOutputFragment : Fragment() {
|
|||
|
||||
private fun setGridParameters(list: RecyclerView) {
|
||||
val layoutManager = list.layoutManager as GridLayoutManager
|
||||
if (resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
layoutManager.orientation = RecyclerView.VERTICAL
|
||||
if (resources.configuration.orientation == ORIENTATION_LANDSCAPE) {
|
||||
layoutManager.spanCount = 4
|
||||
} else {
|
||||
layoutManager.orientation = RecyclerView.HORIZONTAL
|
||||
layoutManager.spanCount = 6
|
||||
layoutManager.spanCount = 2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,14 +57,14 @@
|
|||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/wordList"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toTopOf="@+id/confirmCodeButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider"
|
||||
app:spanCount="6"
|
||||
app:spanCount="2"
|
||||
tools:itemCount="12"
|
||||
tools:listitem="@layout/list_item_recovery_code_output" />
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:padding="24dp"
|
||||
tools:showIn="@layout/fragment_recovery_code_output">
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_1"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout2"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout7"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout3"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="spread_inside">
|
||||
|
@ -26,28 +26,6 @@
|
|||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput2" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_2"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout3"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout7"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput3" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -58,10 +36,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_3"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout4"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout7"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout5"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout2">
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput3"
|
||||
|
@ -70,28 +48,6 @@
|
|||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput4" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_4"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout5"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout7"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout3">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput5" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -102,10 +58,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_5"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout6"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout7"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout7"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout4">
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout3">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput5"
|
||||
|
@ -114,28 +70,6 @@
|
|||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput6" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_6"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout7"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout5">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput7" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -146,11 +80,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_7"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="spread_inside">
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout9"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout5">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput7"
|
||||
|
@ -159,28 +92,6 @@
|
|||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput8" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_8"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout9"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout7">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput9" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -191,10 +102,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_9"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout8">
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout11"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout7">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput9"
|
||||
|
@ -203,28 +114,6 @@
|
|||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput10" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_10"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout11"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout9">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput11" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -235,10 +124,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_11"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout10">
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/wordLayout2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout9">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput11"
|
||||
|
@ -247,6 +136,117 @@
|
|||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput2" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_2"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="spread_inside">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput4" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_4"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout6"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout2">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput6" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_6"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout4">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput8" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_8"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout6">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput10" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/wordLayout10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recovery_code_input_hint_10"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/wordLayout12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout8">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:completionThreshold="1"
|
||||
android:imeOptions="actionNext|flagNavigateNext|flagNoPersonalizedLearning"
|
||||
android:inputType="textAutoComplete"
|
||||
android:nextFocusForward="@+id/wordInput12" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -260,7 +260,7 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wordLayout1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout11">
|
||||
app:layout_constraintTop_toBottomOf="@+id/wordLayout10">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/wordInput12"
|
||||
|
|
Loading…
Add table
Reference in a new issue