Description
TIMOB-28317 adds support for a new Ti.UI.OptionBar element, this should be mirrored in Alloy so that it's usable easily
It should only be useable for apps using SDK 10 or higher, it maybe should have a similar API to where it allows Children elements that will be mapped to the labels property a la Ti.UI.ButtonBar
An API that matches the ButtonBar usage:
<Alloy>
<Window>
<OptionBar style="Ti.UI.OPTION_STYLE_BUTTON">
<Labels>
<Label selected="true">Button 1</Label>
<Label image="/Button2.png">Button 2</Label>
<Label>Button 3</Label>
</Labels>
</OptionBar>
</Window>
</Alloy>
* -The
selected
property will set the
index
property on the UI element to that option, it should warn if multiple have it set- The index should either be set on the OptionBar directly or programatically on open
* The
image
property will change the entry for that option to be a label like
** Question, is setting an image all or nothing or can an individual element set it? *Individual elements can specify an image, on iOS setting an image will cause the text to not be shown*
{ image: <path>, label: <label> }
Noting that my preference is to match the ButtonBar API
PR: https://github.com/appcelerator/alloy/pull/1117