Keyboard.Row
public
static
class
Keyboard.Row
extends Object
| java.lang.Object | |
| ↳ | android.inputmethodservice.Keyboard.Row |
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
defines.
Summary
XML attributes | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
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 " May be a fractional value, which is a floating point number appended with
either % or %p, such as " |
|||||||||
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 " May be a fractional value, which is a floating point number appended with
either % or %p, such as " |
|||||||||
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 " May be a fractional value, which is a floating point number appended with
either % or %p, such as " |
|||||||||
android:keyboardMode |
This is deprecated.
Copy this definition into your own application project.
May be a reference to another resource, in the form
" |
|||||||||
android:rowEdgeFlags |
This is deprecated.
Copy this definition into your own application project.
Must be one or more (separated by '|') of the following constant values.
|
|||||||||
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 " May be a fractional value, which is a floating point number appended with
either % or %p, such as " |
|||||||||
Fields | |
|---|---|
public
int |
defaultHeight
Default height of a key in this row. |
public
int |
defaultHorizontalGap
Default horizontal gap between keys in this row. |
public
int |
defaultWidth
Default width of a key in this row. |
public
int |
mode
The keyboard mode for this row |
public
int |
rowEdgeFlags
Edge flags for this row of keys. |
public
int |
verticalGap
Vertical gap following this row. |
Public constructors | |
|---|---|
Row(Resources res, Keyboard parent, XmlResourceParser parser)
|
|
Row(Keyboard parent)
|
|
Inherited methods | |
|---|---|
XML attributes
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.
Default horizontal gap between keys.
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.
Default height of a key, in pixels or percentage of display width.
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.
Default width of a key, in pixels or percentage of display width.
android:keyboardMode
This is 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".
Mode of the keyboard. If the mode doesn't match the requested keyboard mode, the row will be skipped.
android:rowEdgeFlags
This is 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.Copy this definition into your own application project. |
| top | 4 | Row is anchored to the top of the keyboard.Copy this definition into your own application project. |
Row edge flags.
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.
Default vertical gap between rows of keys.
Fields
defaultHorizontalGap
public int defaultHorizontalGap
Default horizontal gap between keys in this row.
rowEdgeFlags
public int rowEdgeFlags
Edge flags for this row of keys. Possible values that can be assigned are
EDGE_TOP and EDGE_BOTTOM
Public constructors
Row
public Row (Resources res, Keyboard parent, XmlResourceParser parser)
| Parameters | |
|---|---|
res |
Resources |
parent |
Keyboard |
parser |
XmlResourceParser |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-02-13 UTC.