Skip to content

Commit

Permalink
Removed unnecessary strict check
Browse files Browse the repository at this point in the history
  • Loading branch information
konifar committed May 1, 2018
1 parent 73fac76 commit 765808c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions library/src/main/java/co/kyash/rkd/KeyboardDetector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import android.util.Log
import android.view.View
import android.view.ViewGroup
import android.view.ViewTreeObserver
import android.view.WindowManager
import io.reactivex.Observable

class KeyboardDetector constructor(
Expand All @@ -25,12 +24,6 @@ class KeyboardDetector constructor(
return Observable.just(KeyboardStatus.CLOSED)
}

val softInputMethod = activity.window.attributes.softInputMode
if (WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE != softInputMethod
&& WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED != softInputMethod) {
throw IllegalArgumentException("Activity window SoftInputMethod is not ADJUST_RESIZE")
}

val rootView = (activity.findViewById<View>(android.R.id.content) as ViewGroup)

val windowHeight = DisplayMetrics().let {
Expand Down

0 comments on commit 765808c

Please sign in to comment.