public final class Label extends AndroidViewComponent
containerACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF| Constructor and Description |
|---|
Label(ComponentContainer container)
Creates a new Label component.
|
| Modifier and Type | Method and Description |
|---|---|
int |
BackgroundColor()
Returns the label's background color as an alpha-red-green-blue
integer.
|
void |
BackgroundColor(int argb)
Specifies the label's background color as an alpha-red-green-blue
integer.
|
boolean |
FontBold()
Returns true if the label's text should be bold.
|
void |
FontBold(boolean bold)
Specifies whether the label's text should be bold.
|
boolean |
FontItalic()
Returns true if the label's text should be italic.
|
void |
FontItalic(boolean italic)
Specifies whether the label's text should be italic.
|
float |
FontSize()
Returns the label's text's font size, measured in pixels.
|
void |
FontSize(float size)
Specifies the label's text's font size, measured in pixels.
|
int |
FontTypeface()
Returns the label's text's font face as default, serif, sans
serif, or monospace.
|
void |
FontTypeface(int typeface)
Specifies the label's text's font face as default, serif, sans
serif, or monospace.
|
android.view.View |
getView()
Returns the
View that is displayed in the UI. |
boolean |
HasMargins()
Returns true if the label should have margins.
|
void |
HasMargins(boolean hasMargins)
Specifies whether the label should have margins.
|
java.lang.String |
Text()
Returns the text displayed by the label.
|
void |
Text(java.lang.String text)
Specifies the text displayed by the label.
|
int |
TextAlignment()
Returns the alignment of the label's text: center, normal
(e.g., left-justified if text is written left to right), or
opposite (e.g., right-justified if text is written left to right).
|
void |
TextAlignment(int alignment)
Specifies the alignment of the label's text: center, normal
(e.g., left-justified if text is written left to right), or
opposite (e.g., right-justified if text is written left to right).
|
int |
TextColor()
Returns the label's text color as an alpha-red-green-blue
integer.
|
void |
TextColor(int argb)
Specifies the label's text color as an alpha-red-green-blue
integer.
|
Column, Column, CopyHeight, CopyWidth, getDispatchDelegate, Height, Height, Row, Row, Visible, Visible, Width, Widthpublic Label(ComponentContainer container)
container - container, component will be placed inpublic android.view.View getView()
AndroidViewComponentView that is displayed in the UI.getView in class AndroidViewComponentpublic int TextAlignment()
Component.ALIGNMENT_NORMAL,
Component.ALIGNMENT_CENTER or
Component.ALIGNMENT_OPPOSITEpublic void TextAlignment(int alignment)
alignment - one of Component.ALIGNMENT_NORMAL,
Component.ALIGNMENT_CENTER or
Component.ALIGNMENT_OPPOSITEpublic int BackgroundColor()
public void BackgroundColor(int argb)
argb - background RGB color with alphapublic boolean FontBold()
true indicates bold, false normalpublic void FontBold(boolean bold)
bold - true indicates bold, false normalpublic boolean FontItalic()
true indicates italic, false normalpublic void FontItalic(boolean italic)
italic - true indicates italic, false normalpublic boolean HasMargins()
true indicates margins, false no marginspublic void HasMargins(boolean hasMargins)
hasMargins - true indicates that there are margins, false no marginspublic float FontSize()
public void FontSize(float size)
size - font size in pixelpublic int FontTypeface()
public void FontTypeface(int typeface)
typeface - one of Component.TYPEFACE_DEFAULT,
Component.TYPEFACE_SERIF,
Component.TYPEFACE_SANSSERIF or
Component.TYPEFACE_MONOSPACEpublic java.lang.String Text()
public void Text(java.lang.String text)
text - new caption for labelpublic int TextColor()
public void TextColor(int argb)
argb - text RGB color with alpha