alloy
Version:
TiDev Titanium MVC Framework
38 lines (34 loc) • 1.18 kB
text/xml
<Alloy>
<Window>
<!--
Declare option dialog, which will be opened by an event.
The OptionDialog is not part of the view hierarchy.
On iOS, descructive and cancel will change the characteristics
of the options.
-->
<OptionDialog id="options" title="App Options" destructive="3" cancel="2">
<Options>
<Option>option 1</Option>
<Option>option 2</Option>
<Option>cancel</Option>
<Option>destructive</Option>
</Options>
<!-- buttonNames only rendered on Android -->
<ButtonNames>
<ButtonName>button 1</ButtonName>
<ButtonName>button 2</ButtonName>
</ButtonNames>
<!--
Only on Android, an additional view can be added to be rendered in
the OptionDialog, replacing any declared options. It will be
assigned to the underlying "androidView" property of the OptionDialog.
-->
<View layout="horizontal" platform="android">
<ImageView id="avImage" image="/appc4.png" height="40dp" width="40dp"/>
<Label id="avLabel">This is an androidView</Label>
</View>
</OptionDialog>
<!-- The actual view hierarchy code -->
<Button onClick="showOptions">options</Button>
</Window>
</Alloy>