DigitsInputFilter

class DigitsInputFilter(decimalDigits: Int, integerDigits: Int, totalDigits: Int, pasteEnable: Boolean) : InputFilter

限制数字输入

Constructors

DigitsInputFilter
Link copied to clipboard
fun DigitsInputFilter(decimalDigits: Int = 2, integerDigits: Int = Int.MAX_VALUE, totalDigits: Int = Int.MAX_VALUE, pasteEnable: Boolean = true)

Functions

filter
Link copied to clipboard
open override fun filter(source: CharSequence, start: Int, end: Int, dest: Spanned, dstart: Int, dend: Int): CharSequence?

Properties

decimalDigits
Link copied to clipboard
var decimalDigits: Int = 2
Int 小数位数
integerDigits
Link copied to clipboard
var integerDigits: Int
Int 整数位数
pasteEnable
Link copied to clipboard
var pasteEnable: Boolean = true
Boolean 是否允许复制粘贴
totalDigits
Link copied to clipboard
var totalDigits: Int
Int 全部位数