# InputMethodService.Insets

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Insets

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/inputmethodservice/InputMethodService.Insets "View this page in Java")  

```
class Insets
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                               ||
| ↳ | [android.inputmethodservice.InputMethodService.Insets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#) |

Information about where interesting parts of the input method UI appear.

## Summary

|                                                                                                                                                                                                                                                                                                       Constants                                                                                                                                                                                                                                                                                                       ||
|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TOUCHABLE_INSETS_CONTENT](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_CONTENT:kotlin.Int) Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the area inside of the content insets can be touched.                                                                                                                                              |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TOUCHABLE_INSETS_FRAME](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_FRAME:kotlin.Int) Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the entire window frame can be touched.                                                                                                                                                                |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TOUCHABLE_INSETS_REGION](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_REGION:kotlin.Int) Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the region specified by[touchableRegion](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableRegion:android.graphics.Region)can be touched. |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TOUCHABLE_INSETS_VISIBLE](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_VISIBLE:kotlin.Int) Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the area inside of the visible insets can be touched.                                                                                                                                              |

|                                                         Public constructors                                                          ||
|-----------------------------------------------------------------------------------------------------------------------------------|---|
| [Insets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#Insets())`()` <br /> |

|                                                                                                                                                           Properties                                                                                                                                                            ||
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)              | [contentTopInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#contentTopInsets:kotlin.Int) This is the top part of the UI that is the main content.                           |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)              | [touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int) Determine which area of the window is touchable by the user.                         |
| [Region](https://developer.android.com/reference/kotlin/android/graphics/Region.html#)! | [touchableRegion](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableRegion:android.graphics.Region) This is the region of the UI that is touchable.                         |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)              | [visibleTopInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#visibleTopInsets:kotlin.Int) This is the top part of the UI that is visibly covering the application behind it. |

## Constants

### TOUCHABLE_INSETS_CONTENT

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val TOUCHABLE_INSETS_CONTENT: Int
```

Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the area inside of the content insets can be touched.  

    Value: 1

### TOUCHABLE_INSETS_FRAME

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val TOUCHABLE_INSETS_FRAME: Int
```

Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the entire window frame can be touched.  

    Value: 0

### TOUCHABLE_INSETS_REGION

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val TOUCHABLE_INSETS_REGION: Int
```

Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the region specified by[touchableRegion](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableRegion:android.graphics.Region)can be touched.  

    Value: 3

### TOUCHABLE_INSETS_VISIBLE

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val TOUCHABLE_INSETS_VISIBLE: Int
```

Option for[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int): the area inside of the visible insets can be touched.  

    Value: 2

## Public constructors

### Insets

```
Insets()
```

## Properties

### contentTopInsets

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var contentTopInsets: Int
```

This is the top part of the UI that is the main content. It is used to determine the basic space needed, to resize/pan the application behind. It is assumed that this inset does not change very much, since any change will cause a full resize/pan of the application behind. This value is relative to the top edge of the input method window.  

### touchableInsets

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var touchableInsets: Int
```

Determine which area of the window is touchable by the user. May be one of:[TOUCHABLE_INSETS_FRAME](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_FRAME:kotlin.Int),[TOUCHABLE_INSETS_CONTENT](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_CONTENT:kotlin.Int),[TOUCHABLE_INSETS_VISIBLE](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_VISIBLE:kotlin.Int), or[TOUCHABLE_INSETS_REGION](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_REGION:kotlin.Int).  

### touchableRegion

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
val touchableRegion: Region!
```

This is the region of the UI that is touchable. It is used when[touchableInsets](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#touchableInsets:kotlin.Int)is set to[TOUCHABLE_INSETS_REGION](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.Insets#TOUCHABLE_INSETS_REGION:kotlin.Int). The region should be specified relative to the origin of the window frame.  

### visibleTopInsets

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var visibleTopInsets: Int
```

This is the top part of the UI that is visibly covering the application behind it. This provides finer-grained control over visibility, allowing you to change it relatively frequently (such as hiding or showing candidates) without disrupting the underlying UI too much. For example, this will never resize the application UI, will only pan if needed to make the current focus visible, and will not aggressively move the pan position when this changes unless needed to make the focus visible. This value is relative to the top edge of the input method window.