m (formatting) |
m (formatting) |
||
Line 1: | Line 1: | ||
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> | <div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> | ||
− | <span STYLE="font-size: xx-large"><code> | + | <span STYLE="font-size: xx-large"><code>GnAutoCompleteTextView</code></span> |
[[Category:Widget_Library]] | [[Category:Widget_Library]] | ||
Line 8: | Line 8: | ||
;Description | ;Description | ||
: <code>[[GnAutoCompleteTextView]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/AutoCompleteTextView.html AutoCompleteTextView]</code> widget. | : <code>[[GnAutoCompleteTextView]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/AutoCompleteTextView.html AutoCompleteTextView]</code> widget. | ||
− | : It consists of <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> used to search entries of dropdown values and DropDown list which displays a list of entries which match search string. | + | : It consists of an <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> used to search entries of dropdown values and a <code>DropDown</code> 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. | : It has two ways of functioning. It can receive values either from local resources or from the database. | ||
: See <code>[[gn:act_fill_dropdown]]</code> for retrieving values from local source. | : See <code>[[gn:act_fill_dropdown]]</code> for retrieving values from local source. | ||
Line 37: | Line 37: | ||
|- | |- | ||
| title="Attribute" | <code>gn:triggerOnTypingEndEmptyItem</code> | | title="Attribute" | <code>gn:triggerOnTypingEndEmptyItem</code> | ||
− | | title="Description" | Triggers <code>[[gn:act_setOnTypingEnd]]</code> event even <code> | + | | title="Description" | Triggers <code>[[gn:act_setOnTypingEnd]]</code> event even <code>GnEditText</code> content is empty. |
Can be | Can be | ||
* <code>true</code> | * <code>true</code> |
Revision as of 13:17, 12 July 2017
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]"/>