Created
July 23, 2019 10:03
-
-
Save Nublo/320e3291580fc71af9d970f1a7c58dce 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
private fun createActualInput(lengthCount: Int) = EditText(context) | |
.apply { | |
inputType = InputType.TYPE_CLASS_NUMBER | |
isClickable = false | |
maxHeight = 0 | |
maxWidth = 0 | |
alpha = 0F | |
addOrUpdateFilter(InputFilter.LengthFilter(lengthCount)) | |
} | |
private fun createPinItems(count: Int) { | |
actualText = createActualInput(count) | |
actualText.textChanges() | |
.subscribe { | |
updatePins(it.toString()) | |
pinChangesRelay.accept(it) | |
} | |
overlay.clicks().subscribe { focus() } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment