Skip to content

Crossplatform dropdown picker widget for Appcelerator Alloy. Requires libraries from https://github.com/rafbel/titanium_libraries.

Notifications You must be signed in to change notification settings

rafbel/alloy_dropdown_field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published