summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlexander Grahn <agrahn@users.noreply.github.com>2024-08-11 22:27:20 +0200
committerGitHub <noreply@github.com>2024-08-11 20:27:20 +0000
commitf803465e403c43615d5ad134d4b6cd17c4a89917 (patch)
tree04173405dd4362d1d586faab9012def41d1fd061 /app/src/main/res
parentd62516399e36be62a282d4be305381f9e1703fc7 (diff)
add user ID input field (password creation/edit), may fix #1458 (#3161)
* add user ID input field (password creation/edit), may fix #1458 * fix: revert change to username label * refactor: rework FieldItem to drop hard-coded strings * refactor: drop unnecessary `.apply` --------- Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/password_creation_activity.xml22
-rw-r--r--app/src/main/res/values/strings.xml2
2 files changed, 23 insertions, 1 deletions
diff --git a/app/src/main/res/layout/password_creation_activity.xml b/app/src/main/res/layout/password_creation_activity.xml
index c489e121..af6036b2 100644
--- a/app/src/main/res/layout/password_creation_activity.xml
+++ b/app/src/main/res/layout/password_creation_activity.xml
@@ -55,6 +55,26 @@
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:inputType="textNoSuggestions"
+ android:nextFocusForward="@id/username" />
+ </com.google.android.material.textfield.TextInputLayout>
+
+ <com.google.android.material.textfield.TextInputLayout
+ android:visibility="gone"
+ tools:visibility="visible"
+ android:id="@+id/username_input_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="8dp"
+ android:hint="@string/crypto_username_hint"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/name_input_layout">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/username"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:imeOptions="actionNext"
+ android:inputType="textNoSuggestions"
android:nextFocusForward="@id/password" />
</com.google.android.material.textfield.TextInputLayout>
@@ -66,7 +86,7 @@
android:hint="@string/crypto_pass_label"
app:endIconMode="password_toggle"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/name_input_layout">
+ app:layout_constraintTop_toBottomOf="@id/username_input_layout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5c2a7b93..522a82b3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -77,6 +77,7 @@
<!-- PGP Handler -->
<string name="crypto_name_hint">Name</string>
+ <string name="crypto_username_hint">Username</string>
<string name="crypto_pass_label">Password</string>
<string name="crypto_extra_label">Extra content</string>
<string name="crypto_encrypt_username_label">Encrypt username</string>
@@ -88,6 +89,7 @@
<string name="action_search">Search</string>
<string name="password">Password</string>
<string name="username">Username</string>
+ <string name="otp_label_format">OTP (expires in %ds)</string>
<string name="copy_label">Copy</string>
<string name="edit_password">Edit password</string>
<string name="copy_password">Copy password</string>