public abstract class TextBoxBase extends AndroidViewComponent implements android.view.View.OnFocusChangeListener
Modifier and Type | Field and Description |
---|---|
protected android.widget.EditText |
view |
container
ACCELEROMETER_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 |
---|
TextBoxBase(ComponentContainer container,
android.widget.EditText textview)
Creates a new TextBoxBase component
|
Modifier and Type | Method and Description |
---|---|
int |
BackgroundColor()
Returns the textbox's background color as an alpha-red-green-blue
integer.
|
void |
BackgroundColor(int argb)
Specifies the textbox's background color as an alpha-red-green-blue
integer.
|
boolean |
Enabled()
Returns true if the textbox is active and useable.
|
void |
Enabled(boolean enabled)
Specifies whether the textbox should be active and useable.
|
boolean |
FontBold()
Returns true if the textbox's text should be bold.
|
void |
FontBold(boolean bold)
Specifies whether the textbox's text should be bold.
|
boolean |
FontItalic()
Returns true if the textbox's text should be italic.
|
void |
FontItalic(boolean italic)
Specifies whether the textbox's text should be italic.
|
float |
FontSize()
Returns the textbox's text's font size, measured in pixels.
|
void |
FontSize(float size)
Specifies the textbox's text's font size, measured in pixels.
|
int |
FontTypeface()
Returns the textbox's text's font face as default, serif, sans
serif, or monospace.
|
void |
FontTypeface(int typeface)
Specifies the textbox'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. |
void |
GotFocus()
Event raised when this component is selected for input, such as by
the user touching it.
|
java.lang.String |
Hint()
Hint property getter method.
|
void |
Hint(java.lang.String hint)
Hint property setter method.
|
void |
LostFocus()
Event raised when this component is no longer selected for input, such
as if the user touches a different text box.
|
void |
onFocusChange(android.view.View previouslyFocused,
boolean gainFocus) |
void |
RequestFocus()
Request focus to current textbox.
|
java.lang.String |
Text()
Returns the textbox contents.
|
void |
Text(java.lang.String text)
Specifies the textbox contents.
|
int |
TextAlignment()
Returns the alignment of the textbox'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 textbox'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 textbox's text color as an alpha-red-green-blue
integer.
|
void |
TextColor(int argb)
Specifies the textbox's text color as an alpha-red-green-blue
integer.
|
Column, Column, CopyHeight, CopyWidth, getDispatchDelegate, Height, Height, Row, Row, Visible, Visible, Width, Width
public TextBoxBase(ComponentContainer container, android.widget.EditText textview)
container
- container that the component will be placed intextview
- the underlying EditText object that maintains the textpublic android.view.View getView()
AndroidViewComponent
View
that is displayed in the UI.getView
in class AndroidViewComponent
public void GotFocus()
public void LostFocus()
public int TextAlignment()
Component.ALIGNMENT_NORMAL
,
Component.ALIGNMENT_CENTER
or
Component.ALIGNMENT_OPPOSITE
public void TextAlignment(int alignment)
alignment
- one of Component.ALIGNMENT_NORMAL
,
Component.ALIGNMENT_CENTER
or
Component.ALIGNMENT_OPPOSITE
public int BackgroundColor()
public void BackgroundColor(int argb)
argb
- background RGB color with alphapublic boolean Enabled()
true
indicates enabled, false
disabledpublic void Enabled(boolean enabled)
enabled
- true
for enabled, false
disabledpublic 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 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_MONOSPACE
public java.lang.String Hint()
public void Hint(java.lang.String hint)
hint
- hint textpublic java.lang.String Text()
public void Text(java.lang.String text)
text
- new text in text boxpublic int TextColor()
public void TextColor(int argb)
argb
- text RGB color with alphapublic void RequestFocus()
public void onFocusChange(android.view.View previouslyFocused, boolean gainFocus)
onFocusChange
in interface android.view.View.OnFocusChangeListener