diff --git a/blueprint-ui/README.md b/blueprint-ui/README.md index a4d1c175..b942c45c 100644 --- a/blueprint-ui/README.md +++ b/blueprint-ui/README.md @@ -15,16 +15,6 @@ Note that the library uses `androidx.appcompat:appcompat` transitively. Kotlin extensions on `Activity`: ```Kotlin -/** - * Programmatically close soft keyboard. - */ -fun Activity.hideKeyboard(focusedView: View) - -/** - * Programmatically show soft keyboard. - */ -fun Activity.showKeyboard() - /** * Shows status bar on the activity. */ @@ -77,6 +67,20 @@ Kotlin extensions on `AppCompat`: fun AppCompatTextView.setPrecomputedTextFuture(charSequence: CharSequence, executor: Executor? = null) ``` +Kotlin extensions on `Window`: + +```kotlin +/** + * Programmatically shows the soft keyboard. + */ +fun Window.showSoftKeyboard() + +/** + * Programmatically hides the soft keyboard. + */ +fun Window.hideSoftKeyboard() +``` + [Intent.kt][intent-extensions] has extensions on `Activity` and `Context` for launching new activity. For example to launch a new Activity from an Activity: