searchBar event onReturn #13617
-
To refresh the content of my listView with respect to a search string, I use the event onReturn. It works as expected. Only if searchBar is empty, then the event is not triggered. In consequence, I can't go back to initial status of the list. And If I click the searchIcon in the searchBar it also does not trigger the onReturn event at all. The event is only triggered by the searchIcon of the keyboard. Maybe this is specific behavior of the emulator. view.xml:
controller.js
Btw: How to color the underscore, canel- and searchIcon of the searchBar? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I looks like it is not possible because of native restictions: https://stackoverflow.com/a/31573689/5193915
They do the same as I would do in Titanium since you want to do some more styling: use a own textfield. Create something like this: <View>
<TextField/>
<ImageView id="search_icon"/>
<ImageView id="dismiss_icon"/>
</View> and attach your events. 100% freedom for your look & feel. |
Beta Was this translation helpful? Give feedback.
I looks like it is not possible because of native restictions: https://stackoverflow.com/a/31573689/5193915
They do the same as I would do in Titanium since you want to do some more styling: use a own textfield. Create something like this:
and attach your events.
100% freedom for your look & feel.