# SoftwareKeyboardControllerCompat

# SoftwareKeyboardControllerCompat

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/view/SoftwareKeyboardControllerCompat.java+class:androidx.core.view.SoftwareKeyboardControllerCompat)  
Added in[1.11.0](https://developer.android.com/jetpack/androidx/releases/core#1.11.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/view/SoftwareKeyboardControllerCompat "View this page in Java")

<br />

```
class SoftwareKeyboardControllerCompat
```

<br />

*** ** * ** ***

Provide controls for showing and hiding the IME.

This class provides the implementation for[show](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsControllerCompat#show(int))and[hide](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsControllerCompat#hide(int))for the[ime](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type#ime()).

This class only requires a View as a dependency, whereas[WindowInsetsControllerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsControllerCompat)requires a Window for all of its behavior.

## Summary

|                                                                                                                           ### Public constructors                                                                                                                            |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SoftwareKeyboardControllerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/SoftwareKeyboardControllerCompat#SoftwareKeyboardControllerCompat(android.view.View))`(view: `[View](https://developer.android.com/reference/android/view/View.html)`)` |

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [hide](https://developer.android.com/reference/kotlin/androidx/core/view/SoftwareKeyboardControllerCompat#hide())`()` Hide the software keyboard.                       |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [show](https://developer.android.com/reference/kotlin/androidx/core/view/SoftwareKeyboardControllerCompat#show())`()` Request that the system show a software keyboard. |

## Public constructors

### SoftwareKeyboardControllerCompat

Added in[1.11.0](https://developer.android.com/jetpack/androidx/releases/core#1.11.0)  

```
SoftwareKeyboardControllerCompat(view: View)
```  

## Public functions

### hide

Added in[1.11.0](https://developer.android.com/jetpack/androidx/releases/core#1.11.0)  

```
fun hide(): Unit
```

Hide the software keyboard.

This request is best effort, if the system cannot hide the software keyboard this call will silently be ignored.  

### show

Added in[1.11.0](https://developer.android.com/jetpack/androidx/releases/core#1.11.0)  

```
fun show(): Unit
```

Request that the system show a software keyboard.

This request is best effort. If the system can currently show a software keyboard, it will be shown. However, there is no guarantee that the system will be able to show a software keyboard. If the system cannot show a software keyboard currently, this call will be silently ignored.