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.
- The items are sorted by default (ASC).
- 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
|
gn:textValidateErrorColor
|
Defines color of the dropdown selected text in case of validation error
Can be
|
gn:isZeroItemEnabled
|
Defines if zero item should be shown in dropdown (on english is "Select..."). By defaut zero item is shown in dropdown.
Can be
|
gn:noData
|
(milestone 101)
Can be
|
gn:dialogNoData
|
(milestone 101)
Can be
|
gn:hideFrequencies
|
(milestone 103)
Can be
|
gn:dataType
|
Defines datatype of widget |
gn:act_setItemSelect
|
After the item is selected, the action set defined in this attribute will be executed |
gn:isPointerDataTypeNumeric
|
Works in combination with gn:dataType="pointer" , to ensure that DtPointer value is handled as numeric value
Can be
|
Events
Data types
Input |
---|
rows
|
rowsColumn
|
text
|
pointer
|
iBeacon
|
email
|
enum
|
number
|
frequency
|
Output |
---|
iBeacon
|
enum
|
text
|
pointer
|
status
|
number
|
frequency
|
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" />