public class TextfieldStyle
extends java.lang.Object
TextfieldStyle
must be used to edit properties for
Textfields in combination with the native ListView
feature. It
delegates all properties directly to the native element.
This class has only an effect by using the native ListView
feature.
Constructor and Description |
---|
TextfieldStyle(java.lang.Object textfield)
Creates this style by passing either an
nUITextfieldElement or an
Android Text. |
Modifier and Type | Method and Description |
---|---|
int |
getBgColor()
Returns the background color of the underlying Android element or if used
in Phoney, the color of the parent
nUITablecellElement . |
int |
getFontSize()
Returns the current font size in pixels.
|
int |
getFontStyle()
Returns the font style.
|
int |
getHAlign()
Returns the horizontal alignment.
|
int |
getMaxLines()
Returns the amount of maximum displayed lines.
|
java.lang.String |
getText()
Returns the text.
|
int |
getTextColor()
Returns the text color.
|
TextfieldStyle |
setBgColor(int bgColor)
Sets the background of the underlying Android element or if used in
Phoney, the color of the parent
nUITablecellElement . |
TextfieldStyle |
setFontSize(int fontSize)
Sets the font size in pixels.
|
TextfieldStyle |
setFontSizeAbsolute(int fontSize,
boolean accessibilityAdjusted)
Sets the font size in pixels.
|
TextfieldStyle |
setFontSizeRelative(int fontSize,
int scale)
Sets the relative font size in combination with a scale factor.
|
TextfieldStyle |
setFontStyle(int fontStyle)
Sets the font style.
|
TextfieldStyle |
setHAlign(int hAlign)
Sets the horizontal alignment.
|
TextfieldStyle |
setMaxLines(int maxLines)
Sets the max lines property.
|
TextfieldStyle |
setText(java.lang.String text)
Sets the text property.
|
TextfieldStyle |
setTextColor(int textColor)
Sets the text color as ARGB value.
|
public TextfieldStyle(java.lang.Object textfield)
nUITextfieldElement
or an
Android Text.textfield
- public TextfieldStyle setText(java.lang.String text)
text
- public java.lang.String getText()
public TextfieldStyle setFontSize(int fontSize)
fontSize
- public TextfieldStyle setFontSizeAbsolute(int fontSize, boolean accessibilityAdjusted)
fontSize
- accessibilityAdjusted
- public TextfieldStyle setFontSizeRelative(int fontSize, int scale)
fontSize
- scale
- public int getFontSize()
public TextfieldStyle setFontStyle(int fontStyle)
fontStyle
- public int getFontStyle()
public TextfieldStyle setHAlign(int hAlign)
hAlign
- public int getHAlign()
public TextfieldStyle setMaxLines(int maxLines)
maxLines
- public int getMaxLines()
public TextfieldStyle setTextColor(int textColor)
textColor
- public int getTextColor()
public TextfieldStyle setBgColor(int bgColor)
nUITablecellElement
.bgColor
- public int getBgColor()
nUITablecellElement
.