Package com.drake.engine.keyboard

Types

DigitsInputFilter
Link copied to clipboard
class DigitsInputFilter(decimalDigits: Int, integerDigits: Int, totalDigits: Int, pasteEnable: Boolean) : InputFilter
限制数字输入
RegexInputFilter
Link copied to clipboard
class RegexInputFilter(beforeRegex: String?, afterRegex: String?, ignoreCause: Boolean) : InputFilter
正则输入过滤器
VerificationCodeEditText
Link copied to clipboard
class VerificationCodeEditText @JvmOverloads() constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : AppCompatEditText
验证码输入框 https://github.com/kongpf8848/ViewWorld/blob/master/app/src/main/java/com/github/kongpf8848/viewworld/views/VerificationCodeEditText.

Functions

addKeyboardListener
Link copied to clipboard
fun View.addKeyboardListener(onKeyboardChanged: (keyboardVisible: Boolean, keyboardHeight: Int) -> Unit)
getKeyboardHeight
Link copied to clipboard
fun Activity.getKeyboardHeight(): Int
返回键盘高度
hideKeyboard
Link copied to clipboard
fun Activity.hideKeyboard()
隐藏软键盘
fun EditText.hideKeyboard()
inputFilterRegex
Link copied to clipboard
fun EditText.inputFilterRegex(beforeRegex: String? = null, afterRegex: String? = null, ignoreCause: Boolean = false): RegexInputFilter
为EditText添加正则输入过滤器
keyboardVisible
Link copied to clipboard
fun Activity.keyboardVisible(): Boolean
键盘是否显示
setAboveKeyboard
Link copied to clipboard
fun FragmentActivity.setAboveKeyboard(view: View, parent: ViewGroup = view.parent as ViewGroup, onKeyboardChanged: (keyboardVisible: Boolean, keyboardHeight: Int) -> Unit? = null)
设置当前视图始终显示在键盘之上
showKeyboard
Link copied to clipboard
fun Activity.showKeyboard()
显示键盘
fun EditText.showKeyboard()
强制弹出输入法
toggleKeyboard
Link copied to clipboard
fun Context.toggleKeyboard()
切换键盘 显示/隐藏