java.lang.Object | |||
↳ | com.neomades.ui.View | ||
↳ | com.neomades.ui.TextEdit | ||
↳ | com.neomades.ui.TextArea |
A TextArea
represents an area of editable text into Screen. A
TextArea is a TextField that can have several lines.
Default properties
By default, the following properties are applied to a new TextArea:
MATCH_PARENT.
MATCH_CONTENT.
LEFT|TOP.
XML Attributes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Attribute Name | Related Method | Description | |||||||||
lines | setLines(int) | Number of lines |
[Expand]
Inherited XML Attributes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TextArea()
Constructs a TextArea with no text, no default text, and default edit mode
| |||||||||||
TextArea(String text)
Constructs a TextArea with given text, no default text, and default edit mode
| |||||||||||
TextArea(String defaultText, String text)
Constructs a TextArea with given text, given default text, and default edit
mode
| |||||||||||
TextArea(int resId)
Constructs a TextArea with given text, no default text, and default edit mode
| |||||||||||
TextArea(int defaultTextId, int textId)
Constructs a TextArea with given text, given default text, and default edit
mode
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
setLines(int lines)
Sets the number of lines of this text area.
| ||||||||||
void |
setReturnKeyListener(ReturnKeyListener returnKeyListener)
This method has no effect, the return key is used to add a new line.
| ||||||||||
void |
setReturnKeyType(int returnKeyType)
This method has no effect, the return key is used to add a new line.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a TextArea with no text, no default text, and default edit mode
Constructs a TextArea with given text, no default text, and default edit mode
text | the text of this text area |
---|
Constructs a TextArea with given text, given default text, and default edit mode
defaultText | the default text of this area |
---|---|
text | the text of this text area |
Constructs a TextArea with given text, no default text, and default edit mode
resId | the string id representing the text of this text area |
---|
Constructs a TextArea with given text, given default text, and default edit mode
defaultTextId | the string id representing the default text of this area |
---|---|
textId | the string id representing the text of this text area |
Sets the number of lines of this text area.
If the text is longer than this number of lines, a scroll bar will be inserted in the area.
If the text is smaller than this number of lines, empty lines will be displayed after the text to reach the number of lines.
This method uses the setHeight()
method, if a
setHeight()
have been use before it will be overwritten.
lines | number of lines. If 0, no lines will be displayed. If -1, the
number of lines displayed will rely on the text length and the
stretch property of the TextArea (default). If < -1,
an exception will be raised. |
---|
CrossThreadException | if the method is called from outside the UI-Thread |
---|---|
IllegalArgumentException | if lines is < -1 |
This method has no effect, the return key is used to add a new line.
returnKeyListener | the callback used to listen press event on "Return" for the keyboard of the TextField |
---|
This method has no effect, the return key is used to add a new line.
returnKeyType | the ReturnKeyType of the keyboard
|
---|