Created
July 23, 2019 10:01
-
-
Save Nublo/f7b44b24bb356d62b710efb251e00634 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phoneNumber.setOnFocusChangeListener { _, hasFocus -> | |
countryCode.setBackgroundResource(background(hasFocus)) | |
} | |
private fun background(hasFocus: Boolean) = | |
when (hasFocus) { | |
true -> R.drawable.phone_input_active | |
false -> R.drawable.phone_input_inactive | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment