GnAutoCompleteTextView
- Widget XML tag
<com.ginstr.widgets.GnAutoCompleteTextView>
- Description
GnAutoCompleteTextView
inherits regular AndroidAutoCompleteTextView
widget.- It consists of an
EditText
used to search entries of dropdown values and aDropDown
list which displays a list of entries which match search string. - 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:s_decimalFormat
|
Formats dropdown data to specified number format |
gn:completionThreshold
|
Defines the number of characters that the user must type before completion suggestions are displayed in a drop down menu. |
gn:typingTimeInterval
|
Represents number of miliseconds after gn:act_setOnTypingEnd will be executed
Can be
|
gn:triggerOnTypingEndEmptyItem
|
Triggers gn:act_setOnTypingEnd event even GnEditText content is empty.
Can be
|
Events
Example
<com.ginstr.widgets.GnAutoCompleteTextView android:id="@+id/autoCompleteTextView1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="-5dp" android:background="#00000000" gn:s_sourceType="local" gn:data_source_key_local="@array/localAutoComplete" gn:completionThreshold="1" gn:act_validate="[name:RequiredValidator],[message=@string/screen2_dnrRequiredValidatorMessage]" gn:typingTimeInterval="1000" gn:triggerOnTypingEndEmptyItem="true" gn:act_setOnTypingStart="[gn:act_toast]|[START]" gn:act_setOnTypingEnd="[gn:act_toast]|[END]" gn:event_onSelectedItem="[gn:act_toast]|[SELECT]" gn:event_onClearedItem="[gn:act_toast]|[CLEAR]"/>