Misc UI fixups (#851)

This commit is contained in:
Harsh Shandilya 2020-06-14 07:40:33 +00:00 committed by GitHub
parent dd8df232fb
commit 5aab4088d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View file

@ -84,7 +84,11 @@ class GitServerConfigActivity : BaseGitActivity() {
} }
binding.serverUser.apply { binding.serverUser.apply {
setText(serverUser) if (serverUser.isEmpty()) {
requestFocus()
} else {
setText(serverUser)
}
doOnTextChanged { text, _, _, _ -> doOnTextChanged { text, _, _, _ ->
serverUser = text.toString().trim() serverUser = text.toString().trim()
} }

View file

@ -79,10 +79,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="textWebEmailAddress" android:inputType="textWebEmailAddress"
android:nextFocusForward="@id/server_url"> android:nextFocusForward="@id/server_url" />
<requestFocus />
</com.google.android.material.textfield.TextInputEditText>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout

View file

@ -13,6 +13,7 @@
android:id="@+id/git_auth_passphrase_layout" android:id="@+id/git_auth_passphrase_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:endIconMode="password_toggle"
app:hintEnabled="true" app:hintEnabled="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"