public class TextAlignment extends Object
This class sets how text components are aligned in containers such as buttons and layouts. The alignment modes include left alignment, right alignment, horizontal centered alignment, vertical centered alignment, center alignment, top alignment, bottom alignment, start alignment, and end alignment.
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
BOTTOM |
Indicates bottom alignment.
|
static int |
CENTER |
Indicates center alignment.
|
static int |
END |
Indicates that the text is aligned with the end of the container.
|
static int |
HORIZONTAL_CENTER |
Indicates horizontal centered alignment.
|
static int |
LEFT |
Indicates left alignment.
|
static int |
RIGHT |
Indicates right alignment.
|
static int |
START |
Indicates that the text is aligned with the start of the container.
|
static int |
TOP |
Indicates top alignment.
|
static int |
VERTICAL_CENTER |
Indicates vertical centered alignment.
|
| 构造器 | 说明 |
|---|---|
TextAlignment() |
public static final int BOTTOM
This constant indicates that the text is aligned with the bottom edge of the container.
public static final int CENTER
This constant indicates that the text is aligned with the center of the container.
public static final int END
public static final int HORIZONTAL_CENTER
This constant indicates that the text is horizontally centered in the container.
public static final int LEFT
This constant indicates that the text is aligned with the left edge of the container.
public static final int RIGHT
This constant indicates that the text is aligned with the right edge of the container.
public static final int START
public static final int TOP
This constant indicates that the text is aligned with the top edge of the container.
public static final int VERTICAL_CENTER
This constant indicates that the text is vertically centered in the container.