Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1280] Support CommandBar in XML markup

GitHub Issuen/a
TypeNew Feature
PriorityNone
StatusResolved
ResolutionFixed
Resolution Date2015-07-07T23:57:50.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.7.0
ComponentsXML
Labelsn/a
ReporterBenjamin Hatfield
AssigneeFeon Sua Xin Miao
Created2015-06-19T23:15:33.000+0000
Updated2015-07-16T22:21:48.000+0000

Description

Windows Phone has a platform-specific feature called the CommandBar, similar to the Android Action Bar or iOS Toolbar. The Titanium.UI.Windows.CommandBar object is assigned an array of buttons and separators to its items property for it to display. For a classic Titanium example, see: https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.Windows.CommandBar Example of an Alloy view using the CommandBar {noformat} {noformat}

Comments

  1. Fokke Zandbergen 2015-06-28

    Looking at https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.iOS.Toolbar this should be:
       <Alloy>
           <Window>
               <CommandBar platform="windows">
                 <Items>
                     <AppBarButton icon="Titanium.UI.Windows.SystemIcon.ADD"/>
                     <!-- Support shorthand notation, that is, omit the namespace -->
                     <AppBarToggleButton icon="LIKEDISLIKE" />
                     <AppBarSeparator /> 
                   </Items>
               </CommandBar>
           </Window>
       </Alloy>
       
  2. Fokke Zandbergen 2015-06-30

    The 4.1.0 sample app includes a polyfill using the module attribute. It does not use <Items> as Alloy will only allow that element under specific parent elements: https://github.com/appcelerator-developer-relations/appc-sample-ti410/blob/master/app/lib/polyfill.js
  3. Feon Sua Xin Miao 2015-07-02

    PR: https://github.com/appcelerator/alloy/pull/706
  4. Fokke Zandbergen 2015-07-03

    I saw you assigned me to review, what do you need [~fmiao]? I added a comment on the PR code-related and compiled the test app which looks fine.
  5. Fokke Zandbergen 2015-07-07

    [~fmiao] I don't have write access to merge, but I reviewed it and it works. I just think we don't need to specify the full list of constants: https://github.com/appcelerator/alloy/pull/706/files#r34011198
  6. Feon Sua Xin Miao 2015-07-07

    PR Merged.

JSON Source