Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/inputmethodservice/Keyboard#nestedclasses) \| [XML Attrs](https://developer.android.com/reference/android/inputmethodservice/Keyboard#lattrs) \| [Constants](https://developer.android.com/reference/android/inputmethodservice/Keyboard#constants) \| [Ctors](https://developer.android.com/reference/android/inputmethodservice/Keyboard#pubctors) \| [Methods](https://developer.android.com/reference/android/inputmethodservice/Keyboard#pubmethods) \| [Protected Methods](https://developer.android.com/reference/android/inputmethodservice/Keyboard#promethods) \| [Inherited Methods](https://developer.android.com/reference/android/inputmethodservice/Keyboard#inhmethods)

# Keyboard

*** ** * ** ***

` public class Keyboard `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.inputmethodservice.Keyboard |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 29.**   

This class is deprecated because this is just a convenient UI widget class that application developers can re-implement on top of existing public APIs. If you have already depended on this class, consider copying the implementation from AOSP into your project or re-implementing a similar widget by yourselves

Loads an XML description of a keyboard and stores the attributes of the keys. A keyboard consists of rows of keys.

The layout file for a keyboard contains XML that looks like the following snippet:

```
<Keyboard
        android:keyWidth="%10p"
        android:keyHeight="50px"
        android:horizontalGap="2px"
        android:verticalGap="2px" >
    <Row android:keyWidth="32px" >
        <Key android:keyLabel="A" />
        ...
    </Row>
    ...
</Keyboard>
```

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard.Key` Class for describing the position and characteristics of a single key in the keyboard. |
| ` class` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard.Row` Container for keys in the keyboard. |

| ### XML attributes ||
|---|---|
| [`android:horizontalGap`](https://developer.android.com/reference/android/inputmethodservice/Keyboard#attr_android:horizontalGap) | *This is 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`](https://developer.android.com/reference/android/inputmethodservice/Keyboard#attr_android:keyHeight) | *This is 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`](https://developer.android.com/reference/android/inputmethodservice/Keyboard#attr_android:keyWidth) | *This is 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:verticalGap`](https://developer.android.com/reference/android/inputmethodservice/Keyboard#attr_android:verticalGap) | *This is 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.* |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#EDGE_BOTTOM` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#EDGE_LEFT` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#EDGE_RIGHT` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#EDGE_TOP` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#KEYCODE_ALT` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#KEYCODE_CANCEL` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#KEYCODE_DELETE` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#KEYCODE_DONE` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#KEYCODE_MODE_CHANGE` <br /> |
| `int` | `https://developer.android.com/reference/android/inputmethodservice/Keyboard#KEYCODE_SHIFT` <br /> |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#Keyboard(android.content.Context,%20int)(https://developer.android.com/reference/android/content/Context context, int xmlLayoutResId) ` Creates a keyboard from the given xml key layout file. |
| ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#Keyboard(android.content.Context,%20int,%20int)(https://developer.android.com/reference/android/content/Context context, int xmlLayoutResId, int modeId) ` Creates a keyboard from the given xml key layout file. |
| ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#Keyboard(android.content.Context,%20int,%20int,%20int,%20int)(https://developer.android.com/reference/android/content/Context context, int xmlLayoutResId, int modeId, int width, int height) ` Creates a keyboard from the given xml key layout file. |
| ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#Keyboard(android.content.Context,%20int,%20java.lang.CharSequence,%20int,%20int)(https://developer.android.com/reference/android/content/Context context, int layoutTemplateResId, https://developer.android.com/reference/java/lang/CharSequence characters, int columns, int horizontalPadding) ` <br /> Creates a blank keyboard from the given resource file and populates it with the specified characters in left-to-right, top-to-bottom fashion, using the specified number of columns. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getHeight()() ` Returns the total height of the keyboard |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/inputmethodservice/Keyboard.Key>` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getKeys()() ` |
| ` int` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getMinWidth()() ` |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/inputmethodservice/Keyboard.Key>` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getModifierKeys()() ` |
| ` int[]` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getNearestKeys(int,%20int)(int x, int y) ` Returns the indices of the keys that are closest to the given point. |
| ` int` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getShiftKeyIndex()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#isShifted()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#setShifted(boolean)(boolean shiftState) ` |

| ### Protected methods ||
|---|---|
| ` https://developer.android.com/reference/android/inputmethodservice/Keyboard.Key` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#createKeyFromXml(android.content.res.Resources,%20android.inputmethodservice.Keyboard.Row,%20int,%20int,%20android.content.res.XmlResourceParser)(https://developer.android.com/reference/android/content/res/Resources res, https://developer.android.com/reference/android/inputmethodservice/Keyboard.Row parent, int x, int y, https://developer.android.com/reference/android/content/res/XmlResourceParser parser) ` |
| ` https://developer.android.com/reference/android/inputmethodservice/Keyboard.Row` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#createRowFromXml(android.content.res.Resources,%20android.content.res.XmlResourceParser)(https://developer.android.com/reference/android/content/res/Resources res, https://developer.android.com/reference/android/content/res/XmlResourceParser parser) ` |
| ` int` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getHorizontalGap()() ` |
| ` int` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getKeyHeight()() ` |
| ` int` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getKeyWidth()() ` |
| ` int` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#getVerticalGap()() ` |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#setHorizontalGap(int)(int gap) ` |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#setKeyHeight(int)(int height) ` |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#setKeyWidth(int)(int width) ` |
| ` void` | ` https://developer.android.com/reference/android/inputmethodservice/Keyboard#setVerticalGap(int)(int gap) ` |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## XML attributes

### android:horizontalGap

<br />

**This is 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.

Default horizontal gap between keys.

<br />

### android:keyHeight

<br />

**This is 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.

Default height of a key, in pixels or percentage of display width.

<br />

### android:keyWidth

<br />

**This is 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.

Default width of a key, in pixels or percentage of display width.

<br />

### android:verticalGap

<br />

**This is 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.

Default vertical gap between rows of keys.

<br />

## Constants

### EDGE_BOTTOM

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

```
public static final int EDGE_BOTTOM
```

<br />

<br />

Constant Value: 8 (0x00000008)

### EDGE_LEFT

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

```
public static final int EDGE_LEFT
```

<br />

<br />

Constant Value: 1 (0x00000001)

### EDGE_RIGHT

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

```
public static final int EDGE_RIGHT
```

<br />

<br />

Constant Value: 2 (0x00000002)

### EDGE_TOP

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

```
public static final int EDGE_TOP
```

<br />

<br />

Constant Value: 4 (0x00000004)

### KEYCODE_ALT

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

```
public static final int KEYCODE_ALT
```

<br />

<br />

Constant Value: -6 (0xfffffffa)

### KEYCODE_CANCEL

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

```
public static final int KEYCODE_CANCEL
```

<br />

<br />

Constant Value: -3 (0xfffffffd)

### KEYCODE_DELETE

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

```
public static final int KEYCODE_DELETE
```

<br />

<br />

Constant Value: -5 (0xfffffffb)

### KEYCODE_DONE

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

```
public static final int KEYCODE_DONE
```

<br />

<br />

Constant Value: -4 (0xfffffffc)

### KEYCODE_MODE_CHANGE

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

```
public static final int KEYCODE_MODE_CHANGE
```

<br />

<br />

Constant Value: -2 (0xfffffffe)

### KEYCODE_SHIFT

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

```
public static final int KEYCODE_SHIFT
```

<br />

<br />

Constant Value: -1 (0xffffffff)

## Public constructors

### Keyboard

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

```
public Keyboard (Context context, 
                int xmlLayoutResId)
```

Creates a keyboard from the given xml key layout file.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the application or service context <br /> |
| `xmlLayoutResId` | `int`: the resource file that contains the keyboard layout and keys. <br /> |

### Keyboard

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

```
public Keyboard (Context context, 
                int xmlLayoutResId, 
                int modeId)
```

Creates a keyboard from the given xml key layout file. Weeds out rows that have a keyboard mode defined but don't match the specified mode.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the application or service context <br /> |
| `xmlLayoutResId` | `int`: the resource file that contains the keyboard layout and keys. <br /> |
| `modeId` | `int`: keyboard mode identifier <br /> |

### Keyboard

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

```
public Keyboard (Context context, 
                int xmlLayoutResId, 
                int modeId, 
                int width, 
                int height)
```

Creates a keyboard from the given xml key layout file. Weeds out rows that have a keyboard mode defined but don't match the specified mode.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the application or service context <br /> |
| `xmlLayoutResId` | `int`: the resource file that contains the keyboard layout and keys. <br /> |
| `modeId` | `int`: keyboard mode identifier <br /> |
| `width` | `int`: sets width of keyboard <br /> |
| `height` | `int`: sets height of keyboard <br /> |

### Keyboard

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

```
public Keyboard (Context context, 
                int layoutTemplateResId, 
                CharSequence characters, 
                int columns, 
                int horizontalPadding)
```

<br />

Creates a blank keyboard from the given resource file and populates it with the specified characters in left-to-right, top-to-bottom fashion, using the specified number of columns.

If the specified number of columns is -1, then the keyboard will fit as many keys as possible in each row.

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the application or service context <br /> |
| `layoutTemplateResId` | `int`: the layout template file, containing no keys. <br /> |
| `characters` | `CharSequence`: the list of characters to display on the keyboard. One key will be created for each character. <br /> |
| `columns` | `int`: the number of columns of keys to display. If this number is greater than the number of keys that can fit in a row, it will be ignored. If this number is -1, the keyboard will fit as many keys as possible in each row. <br /> |
| `horizontalPadding` | `int` <br /> |

## Public methods

### getHeight

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

```
public int getHeight ()
```

Returns the total height of the keyboard

<br />

| Returns ||
|---|---|
| `int` | the total height of the keyboard <br /> |

### getKeys

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

```
public List<Keyboard.Key> getKeys ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/inputmethodservice/Keyboard.Key>` | <br /> |

### getMinWidth

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

```
public int getMinWidth ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getModifierKeys

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

```
public List<Keyboard.Key> getModifierKeys ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/inputmethodservice/Keyboard.Key>` | <br /> |

### getNearestKeys

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

```
public int[] getNearestKeys (int x, 
                int y)
```

Returns the indices of the keys that are closest to the given point.

<br />

| Parameters ||
|---|---|
| `x` | `int`: the x-coordinate of the point <br /> |
| `y` | `int`: the y-coordinate of the point <br /> |

| Returns ||
|---|---|
| `int[]` | the array of integer indices for the nearest keys to the given point. If the given point is out of range, then an array of size zero is returned. <br /> |

### getShiftKeyIndex

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

```
public int getShiftKeyIndex ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### isShifted

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

```
public boolean isShifted ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### setShifted

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

```
public boolean setShifted (boolean shiftState)
```

<br />

<br />

| Parameters ||
|---|---|
| `shiftState` | `boolean` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

## Protected methods

### createKeyFromXml

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

```
protected Keyboard.Key createKeyFromXml (Resources res, 
                Keyboard.Row parent, 
                int x, 
                int y, 
                XmlResourceParser parser)
```

<br />

<br />

| Parameters ||
|---|---|
| `res` | `Resources` <br /> |
| `parent` | `Keyboard.Row` <br /> |
| `x` | `int` <br /> |
| `y` | `int` <br /> |
| `parser` | `XmlResourceParser` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/inputmethodservice/Keyboard.Key` | <br /> |

### createRowFromXml

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

```
protected Keyboard.Row createRowFromXml (Resources res, 
                XmlResourceParser parser)
```

<br />

<br />

| Parameters ||
|---|---|
| `res` | `Resources` <br /> |
| `parser` | `XmlResourceParser` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/inputmethodservice/Keyboard.Row` | <br /> |

### getHorizontalGap

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

```
protected int getHorizontalGap ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getKeyHeight

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

```
protected int getKeyHeight ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getKeyWidth

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

```
protected int getKeyWidth ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getVerticalGap

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

```
protected int getVerticalGap ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### setHorizontalGap

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

```
protected void setHorizontalGap (int gap)
```

<br />

<br />

| Parameters ||
|---|---|
| `gap` | `int` <br /> |

### setKeyHeight

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

```
protected void setKeyHeight (int height)
```

<br />

<br />

| Parameters ||
|---|---|
| `height` | `int` <br /> |

### setKeyWidth

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

```
protected void setKeyWidth (int width)
```

<br />

<br />

| Parameters ||
|---|---|
| `width` | `int` <br /> |

### setVerticalGap

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

```
protected void setVerticalGap (int gap)
```

<br />

<br />

| Parameters ||
|---|---|
| `gap` | `int` <br /> |