# Keyboard.Row

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

# Row

*** ** * ** ***

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

```
open class Row
```

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

*** ** * ** ***

| **This class was deprecated in API level 29.**
|
| Deprecated in Java.

Container for keys in the keyboard. All keys in a row are at the same Y-coordinate. Some of the key size defaults can be overridden per row from what the[Keyboard](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard)defines.

## Summary

|                                                                                         XML attributes                                                                                         ||
|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [`android:horizontalGap`](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#attr_Row) | Default horizontal gap between keys.                               |
| [`android:keyHeight`](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#attr_Row)     | Default height of a key, in pixels or percentage of display width. |
| [`android:keyWidth`](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#attr_Row)      | Default width of a key, in pixels or percentage of display width.  |
| [`android:keyboardMode`](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#attr_Row)  | Mode of the keyboard.                                              |
| [`android:rowEdgeFlags`](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#attr_Row)  | Row edge flags.                                                    |
| [`android:verticalGap`](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#attr_Row)   | Default vertical gap between rows of keys.                         |

|                                                                                                                                                                                                                                                                                Public constructors                                                                                                                                                                                                                                                                                 ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Row](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#Row(android.content.res.Resources,%20android.inputmethodservice.Keyboard,%20android.content.res.XmlResourceParser))`(`res:` `[Resources](https://developer.android.com/reference/kotlin/android/content/res/Resources.html#)!`, `parent:` `[Keyboard](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard)!`, `parser:` `[XmlResourceParser](https://developer.android.com/reference/kotlin/android/content/res/XmlResourceParser.html#)!`)` <br /> |
| [Row](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#Row(android.inputmethodservice.Keyboard))`(`parent:` `[Keyboard](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard)!`)` <br />                                                                                                                                                                                                                                                                                                                    |

|                                                                                                                                 Properties                                                                                                                                  ||
|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [defaultHeight](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#defaultHeight:kotlin.Int) Default height of a key in this row.                           |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [defaultHorizontalGap](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#defaultHorizontalGap:kotlin.Int) Default horizontal gap between keys in this row. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [defaultWidth](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#defaultWidth:kotlin.Int) Default width of a key in this row.                              |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [mode](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#mode:kotlin.Int) The keyboard mode for this row                                                   |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [rowEdgeFlags](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#rowEdgeFlags:kotlin.Int) Edge flags for this row of keys.                                 |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [verticalGap](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard.Row#verticalGap:kotlin.Int) Vertical gap following this row.                                   |

## XML attributes

### android:horizontalGap

```
android:horizontalGap
```
Default horizontal gap between keys. {@deprecated Copy this definition into your own application project.}

May be a dimension value, which is a floating point number appended with a unit such as "`14.5sp`". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

May be a fractional value, which is a floating point number appended with either % or %p, such as "`14.5%`". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container.  

### android:keyHeight

```
android:keyHeight
```
Default height of a key, in pixels or percentage of display width. {@deprecated Copy this definition into your own application project.}

May be a dimension value, which is a floating point number appended with a unit such as "`14.5sp`". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

May be a fractional value, which is a floating point number appended with either % or %p, such as "`14.5%`". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container.  

### android:keyWidth

```
android:keyWidth
```
Default width of a key, in pixels or percentage of display width. {@deprecated Copy this definition into your own application project.}

May be a dimension value, which is a floating point number appended with a unit such as "`14.5sp`". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

May be a fractional value, which is a floating point number appended with either % or %p, such as "`14.5%`". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container.  

### android:keyboardMode

```
android:keyboardMode
```
Mode of the keyboard. If the mode doesn't match the requested keyboard mode, the row will be skipped. {@deprecated Copy this definition into your own application project.}

May be a reference to another resource, in the form "`@[+][`*package* `:]`*type* `/`*name*" or a theme attribute in the form "`?[`*package* `:]`*type* `/`*name*".  

### android:rowEdgeFlags

```
android:rowEdgeFlags
```
Row edge flags. {@deprecated Copy this definition into your own application project.}

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value |                                                     Description                                                      |
|----------|-------|----------------------------------------------------------------------------------------------------------------------|
| bottom   | 8     | Row is anchored to the bottom of the keyboard. {@deprecated Copy this definition into your own application project.} |
| top      | 4     | Row is anchored to the top of the keyboard. {@deprecated Copy this definition into your own application project.}    |

### android:verticalGap

```
android:verticalGap
```
Default vertical gap between rows of keys. {@deprecated Copy this definition into your own application project.}

May be a dimension value, which is a floating point number appended with a unit such as "`14.5sp`". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

May be a fractional value, which is a floating point number appended with either % or %p, such as "`14.5%`". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container.

## Public constructors

### Row

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

```
Row(
    res: Resources!, 
    parent: Keyboard!, 
    parser: XmlResourceParser!)
```  

### Row

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

```
Row(parent: Keyboard!)
```

## Properties

### defaultHeight

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

```
var defaultHeight: Int
```

**Deprecated:** *Deprecated in Java.*

Default height of a key in this row.  

### defaultHorizontalGap

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

```
var defaultHorizontalGap: Int
```

**Deprecated:** *Deprecated in Java.*

Default horizontal gap between keys in this row.  

### defaultWidth

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

```
var defaultWidth: Int
```

**Deprecated:** *Deprecated in Java.*

Default width of a key in this row.  

### mode

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

```
var mode: Int
```

**Deprecated:** *Deprecated in Java.*

The keyboard mode for this row  

### rowEdgeFlags

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

```
var rowEdgeFlags: Int
```

**Deprecated:** *Deprecated in Java.*

Edge flags for this row of keys. Possible values that can be assigned are[EDGE_TOP](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard#EDGE_TOP:kotlin.Int)and[EDGE_BOTTOM](https://developer.android.com/reference/kotlin/android/inputmethodservice/Keyboard#EDGE_BOTTOM:kotlin.Int)  

### verticalGap

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

```
var verticalGap: Int
```

**Deprecated:** *Deprecated in Java.*

Vertical gap following this row.