public final class ListView extends AndroidViewComponent implements android.widget.AdapterView.OnItemClickListener
Modifier and Type | Field and Description |
---|---|
protected ComponentContainer |
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 |
---|
ListView(ComponentContainer container)
Creates a new ListView component.
|
Modifier and Type | Method and Description |
---|---|
void |
AfterPicking()
Simple event to be raised after the an element has been chosen in the list.
|
int |
BackgroundColor()
Returns the listview's background color as an alpha-red-green-blue
integer, i.e.,
0xAARRGGBB . |
void |
BackgroundColor(int argb)
Specifies the ListView's background color as an alpha-red-green-blue
integer, i.e.,
0xAARRGGBB . |
YailList |
Elements()
Elements property getter method
|
void |
Elements(YailList itemsList)
Set a list of text elements to build a ListView
|
void |
ElementsFromString(java.lang.String itemstring)
Specifies the text elements of the ListView.
|
android.view.View |
getView()
Returns the
View that is displayed in the UI. |
void |
Height(int height)
Sets the height of the listView on the screen
|
android.text.Spannable[] |
itemsToColoredText() |
void |
onItemClick(android.widget.AdapterView<?> parent,
android.view.View view,
int position,
long id)
Simple event to raise when the component is clicked.
|
java.lang.String |
Selection()
Returns the text in the ListView at the position set by SelectionIndex
|
void |
Selection(java.lang.String value)
Selection property setter method.
|
int |
SelectionIndex()
Selection index property getter method.
|
void |
SelectionIndex(int index)
Sets the index to the passed argument for selection
|
void |
setAdapterData()
Sets the items of the ListView through an adapter
|
void |
setBackgroundColor(int color)
Assigns a value to the backgroundColor
|
boolean |
ShowFilterBar()
Returns true or false depending on the visibility of the Filter bar element
|
void |
ShowFilterBar(boolean showFilter)
Sets true or false to determine whether the search filter box is displayed in the ListView
|
int |
TextColor()
Returns the listview's text item color as an alpha-red-green-blue
integer, i.e.,
0xAARRGGBB . |
void |
TextColor(int argb)
Specifies the ListView item's text color as an alpha-red-green-blue
integer, i.e.,
0xAARRGGBB . |
int |
TextSize()
Returns the listview's text font Size
|
void |
TextSize(int fontSize)
Specifies the ListView item's text font size
|
void |
Width(int width)
Sets the width of the listView on the screen
|
Column, Column, CopyHeight, CopyWidth, getDispatchDelegate, Height, Row, Row, Visible, Visible, Width
protected final ComponentContainer container
public ListView(ComponentContainer container)
container
- container that the component will be placed inpublic android.view.View getView()
AndroidViewComponent
View
that is displayed in the UI.getView
in class AndroidViewComponent
public void Height(int height)
Height
in class AndroidViewComponent
height
- for height lengthpublic void Width(int width)
Width
in class AndroidViewComponent
width
- for width lengthpublic void ShowFilterBar(boolean showFilter)
showFilter
- set the visibility according to this inputpublic boolean ShowFilterBar()
public void Elements(YailList itemsList)
itemsList
- a YailList containing the strings to be added to the ListViewpublic YailList Elements()
public void ElementsFromString(java.lang.String itemstring)
itemstring
- a string containing a comma-separated list of the strings to be picked frompublic void setAdapterData()
public android.text.Spannable[] itemsToColoredText()
public int SelectionIndex()
public void SelectionIndex(int index)
index
- the index to be selectedpublic java.lang.String Selection()
public void Selection(java.lang.String value)
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id)
onItemClick
in interface android.widget.AdapterView.OnItemClickListener
public void AfterPicking()
public void setBackgroundColor(int color)
color
- an alpha-red-green-blue integer for a colorpublic int BackgroundColor()
0xAARRGGBB
. An alpha of 00
indicates fully transparent and FF
means opaque.public void BackgroundColor(int argb)
0xAARRGGBB
. An alpha of 00
indicates fully transparent and FF
means opaque.argb
- background color in the format 0xAARRGGBB, which
includes alpha, red, green, and blue componentspublic int TextColor()
0xAARRGGBB
. An alpha of 00
indicates fully transparent and FF
means opaque.public void TextColor(int argb)
0xAARRGGBB
. An alpha of 00
indicates fully transparent and FF
means opaque.argb
- background color in the format 0xAARRGGBB, which
includes alpha, red, green, and blue componentspublic int TextSize()
public void TextSize(int fontSize)
integer
- value for font size