From wiki.ginstr.com
Jump to: navigation, search

gn:act_fill_dropdown

Description
Action used to fill GnDropDown or GnAutoCompleteTextView widget with values from local source
Action returns
void
Required target attributes
gn:s_sourceType="" - source type, must be "local"
gn:data_source_key_local="" - string array; e.g. @array/visitTypes

Action signatures

Fill GnDropDown or GnAutoCompleteTextView with local values

[gn:act_fill_dropdown]|[target]
Parameter Description
target target where the local values will be filled

Example

@+id/ddCleaningReport_visitType - GnDropDown
[gn:act_fill_dropdown]|[@+id/ddCleaningReport_visitType]
arrays.xml
  <string-array name="visitTypes">
  <item>Toilet Service</item>
  <item>Inspection</item>
  <item>Cleaning</item>
  <item>Mopping</item>
  <item>Mopping and vacuuming</item>
</string-array>
queries.xml
<com.ginstr.widgets.GnDropDown
  android:id="@+id/ddCleaningReport_visitType"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:background="@drawable/dropdown"
  gn:s_sourceType="local"
  gn:data_source_key_local="@array/visitTypes" />