decoro icon indicating copy to clipboard operation
decoro copied to clipboard

Как разрешить ввод текстовых символов для кастомной маски?

Open Novikov opened this issue 3 years ago • 1 comments

Использую следующий код

const val DRIVER_LICENCE_MASK = "__ __ ______"
val slots = UnderscoreDigitSlotsParser().parseSlots(DRIVER_LICENCE_MASK)
val formatWatcher = MaskFormatWatcher(MaskImpl.createTerminated(slots))

EditText позволяет ввести только цифры. Как добавить ввод текстовых символов?

Novikov avatar Dec 31 '21 12:12 Novikov

Можно понаследовать UnderscoreDigitSlotsParser Переопределить метод slotFromUnderscoreCharacter И вернуть в нем вместо PredefinedSlots.digit() слот позволяющий любой символ any

al-dr avatar Dec 31 '21 12:12 al-dr