diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-03-19 19:40:04 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-03-22 07:05:13 -0300 |
| commit | 8da99351acd8976a0fa44049941bd72dfac044e4 (patch) | |
| tree | debaa8b96d88ddcdd784190b445f4aa13a8a22fe /android | |
| parent | c0490ef44c32d85c57720be9121a02ea20805c57 (diff) | |
| download | mullvadvpn-8da99351acd8976a0fa44049941bd72dfac044e4.tar.xz mullvadvpn-8da99351acd8976a0fa44049941bd72dfac044e4.zip | |
Remove border when logging in
Diffstat (limited to 'android')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/AccountInput.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/AccountInput.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/AccountInput.kt index c1fd84be94..eb666dc649 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/AccountInput.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/AccountInput.kt @@ -45,7 +45,9 @@ class AccountInput(val parentView: View, val context: Context) { input.apply { addTextChangedListener(InputWatcher()) - onFocusChangeListener = OnFocusChangeListener { _, hasFocus -> updateBorder(hasFocus) } + onFocusChangeListener = OnFocusChangeListener { view, hasFocus -> + updateBorder(hasFocus && view.isEnabled()) + } } container.apply { @@ -73,6 +75,7 @@ class AccountInput(val parentView: View, val context: Context) { setTextColor(disabledTextColor) setEnabled(false) visibility = View.VISIBLE + clearFocus() } } @@ -87,6 +90,7 @@ class AccountInput(val parentView: View, val context: Context) { button.visibility = View.VISIBLE input.apply { + findFocus() setTextColor(errorTextColor) setEnabled(true) visibility = View.VISIBLE |
