From 5aab4088d1697317c8c77e3565a7b0605a21b53f Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 14 Jun 2020 07:40:33 +0000 Subject: Misc UI fixups (#851) --- app/src/main/java/com/zeapo/pwdstore/git/GitServerConfigActivity.kt | 6 +++++- app/src/main/res/layout/activity_git_clone.xml | 5 +---- app/src/main/res/layout/git_credential_layout.xml | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitServerConfigActivity.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitServerConfigActivity.kt index 1f5494fd..7a3978ba 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitServerConfigActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitServerConfigActivity.kt @@ -84,7 +84,11 @@ class GitServerConfigActivity : BaseGitActivity() { } binding.serverUser.apply { - setText(serverUser) + if (serverUser.isEmpty()) { + requestFocus() + } else { + setText(serverUser) + } doOnTextChanged { text, _, _, _ -> serverUser = text.toString().trim() } diff --git a/app/src/main/res/layout/activity_git_clone.xml b/app/src/main/res/layout/activity_git_clone.xml index 6fe19f19..8026fa4a 100644 --- a/app/src/main/res/layout/activity_git_clone.xml +++ b/app/src/main/res/layout/activity_git_clone.xml @@ -79,10 +79,7 @@ android:layout_height="wrap_content" android:imeOptions="actionNext" android:inputType="textWebEmailAddress" - android:nextFocusForward="@id/server_url"> - - - + android:nextFocusForward="@id/server_url" />