From 765808cc34242527137f7d53f0bc5410608b426f Mon Sep 17 00:00:00 2001 From: konifar Date: Wed, 2 May 2018 06:04:21 +0900 Subject: [PATCH] Removed unnecessary strict check --- library/src/main/java/co/kyash/rkd/KeyboardDetector.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/library/src/main/java/co/kyash/rkd/KeyboardDetector.kt b/library/src/main/java/co/kyash/rkd/KeyboardDetector.kt index ab15f98..fda8137 100644 --- a/library/src/main/java/co/kyash/rkd/KeyboardDetector.kt +++ b/library/src/main/java/co/kyash/rkd/KeyboardDetector.kt @@ -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( @@ -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(android.R.id.content) as ViewGroup) val windowHeight = DisplayMetrics().let {