Contents
GnDropDown
- Widget XML tag
<com.ginstr.widgets.GnDropDown>
- Description
GnDropDown
inherits regular AndroidSpinner
widget.- It provides the entry of dropdown values.
- It has two ways of functioning. It can receive values either from local resources or from the database.
- See
gn:act_fill_dropdown
for retrieving values from local source.
XML Attributes Description
Attribute | Description |
---|---|
gn:s_sourceType
|
Sets source for data load into dropdown
Can be
|
gn:singleItemMode
|
Enables table with single row to be set as source
Can be
|
gn:data_queryType
|
If queries.xml dbRequest used to populate dropdown defines query keys, this attribute can be used to sort the query result
|
gn:textColor
|
Changes color of zero item
Can be
|
gn:s_ZeroItemText
|
Sets text of choice for zero item of the dropdown
Can be
|
gn:s_title
|
Adds title to selection box of dropdown which is displayed after click on dropdown
Can be
|
gn:s_dataFilters
|
GnDropDown supports filtering like GnListView , please read here how to use filters.
|
gn:s_sortColumn
|
Defines column used to sort dropdown data
Can be |
gn:s_sortOrder
|
Toggles sort order between ascending & descending provided gn:s_sortColumn is defined
Can be |
gn:textSize
|
Sets size of text in widget to defined value
Unit for size (sp) is obligatory. |
gn:zeroItemEventEnabled
|
Executes gn:act_setItemSelect actions also when first item in list is selected
Can be
|
gn:s_listSelector
|
Sets the color of selector when user clicks on row in GnListView
|
gn:s_decimalFormat
|
Formats dropdown data to specified number format |
gn:displayColumns
|
Represents a list of columns which data will be displayed in dropdown data as one item
Can be
|
gn:displayColumnsSeparator
|
Represents a separator for column values
Can be
|
gn:closePopupAfterDataSetOrSelect
|
Closes the popup window after the data is set or item is select
Can be
|
Example
<com.ginstr.widgets.GnDropDown android:id="@+id/constructionSite" android:layout_width="fill_parent" android:layout_height="wrap_content" gn:singleItemMode="true" gn:zeroItemEventEnabled="true" />