add ktlint plugin to project and apply default code style (#2209)
* add ktlint plugin to project and apply default code style * some manual adjustments, fix wildcard imports * update CONTRIBUTING.md * fix formatting
This commit is contained in:
parent
955267199e
commit
16ffcca748
227 changed files with 3933 additions and 3371 deletions
|
|
@ -45,7 +45,8 @@ open class DefaultTextWatcher : TextWatcher {
|
|||
}
|
||||
|
||||
inline fun EditText.onTextChanged(
|
||||
crossinline callback: (s: CharSequence, start: Int, before: Int, count: Int) -> Unit) {
|
||||
crossinline callback: (s: CharSequence, start: Int, before: Int, count: Int) -> Unit
|
||||
) {
|
||||
addTextChangedListener(object : DefaultTextWatcher() {
|
||||
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
callback(s, start, before, count)
|
||||
|
|
@ -54,10 +55,11 @@ inline fun EditText.onTextChanged(
|
|||
}
|
||||
|
||||
inline fun EditText.afterTextChanged(
|
||||
crossinline callback: (s: Editable) -> Unit) {
|
||||
crossinline callback: (s: Editable) -> Unit
|
||||
) {
|
||||
addTextChangedListener(object : DefaultTextWatcher() {
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
callback(s)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue