pull/83/head
kunfei 5 years ago
parent 851a5bcb31
commit 660cedea68
  1. 2
      app/src/main/java/io/legado/app/utils/ViewExtensions.kt

@ -24,7 +24,7 @@ private tailrec fun getCompatActivity(context: Context?): AppCompatActivity? {
val View.activity: AppCompatActivity? val View.activity: AppCompatActivity?
get() = getCompatActivity(context) get() = getCompatActivity(context)
inline fun View.hideSoftInput() = run { fun View.hideSoftInput() = run {
val imm = App.INSTANCE.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager val imm = App.INSTANCE.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager
imm?.let { imm?.let {
imm.hideSoftInputFromWindow(this.windowToken, 0) imm.hideSoftInputFromWindow(this.windowToken, 0)

Loading…
Cancel
Save