Crossplatform dropdown picker widget for Appcelerator Alloy. Requires libraries from https://github.com/rafbel/titanium_libraries.
Switch branches/tags
Nothing to show
Clone or download
Latest commit a12dd56 Dec 1, 2017
Permalink
Failed to load latest commit information.
controllers first commit Nov 28, 2017
styles first commit Nov 28, 2017
views first commit Nov 28, 2017
README.md Create README.md Dec 1, 2017
widget.json first commit Nov 28, 2017

README.md

Dropdown Field

Single ropdown picker for Android and iOS.

Overview

This widget looks exactly like a dropdown picker. The images below show the design of the widget on iOS (since on Android it is pretty much a default dropdown picker)

When clicked, an option dialog opens up and the user is able to select an option from the list.

Check it out! Your option is now selected!

Use it on your app!

Alloy
<Widget id="myDropdownField" src="dropdownField"/>
Controller
/* Params:
* an array with all available options
* default text to show on the field to be presented on the screen (the one similar to the picker)
* callback function to be called when an option is selected (optional argument)
*/
$.myDropdownField.initialize(optionsArray,dropdownDefaultText, function(selectedOption)
{
    console.log(selectedOption);
}); 

The widget comes with many other functions such as setTop, setWidth, setLeft,getDropdownValue,setDropdownValue, getSelectedIndex, resetValue, and setVisibility.

Some libraries from https://github.com/rafbel/titanium_libraries are required.