Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-984

Support RightNavButtons and LeftNavButtons in Alloy XML Markup

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Alloy 1.4.0
    • Fix Version/s: Alloy 1.5.0
    • Component/s: XML
    • Labels:
    • Sprint:
      2014 Sprint 11 Alloy

      Description

      ENVIRONMENT:
      Alloy from master (commit 2267d1d002d7f7bd1f9b61557c11c8d24f259a45/Tue Mar 25 17:31:19 2014 -0400)
      Titanium SDK 3.3.0.v20140409153121
      Appcelerator Studio, build: 3.3.0.201403281814
      Mac OS X 10.8.5
      Xcode 5.0.2/iOS 7.0.3/iPad or iPhone Retina simulator

      DESCRIPTION:
      Ti SDK 3.3.0 is introducing two new iOS-only properties for a Window object: `rightNavButtons` and `leftNavButtons`. These accept an array of views.

      Just an FYI to see if it would be possible to implement these properties in Alloy XML. See sample below.

      YAML Docs:
      https://github.com/appcelerator/titanium_mobile/blob/master/apidoc/Titanium/UI/Window.yml#L409-L413

      https://github.com/appcelerator/titanium_mobile/blob/master/apidoc/Titanium/UI/Window.yml#L634-L638

      SAMPLE XML:

      <Alloy>
          <NavigationWindow>
              <Window>
                  <LeftNavButtons>
                      <View width="25" height="25" backgroundColor="red"/>
                      <View width="25" height="25" backgroundColor="green"/>
                      <View width="25" height="25" backgroundColor="blue"/>
                  </LeftNavButtons>
                  <RightNavButtons>
                      <Button title="btn 1"/>
                      <Button title="btn 2"/>
                      <Button title="btn 3"/>
                  </RightNavButtons>
              </Window>
          </NavigationWindow>
      </Alloy>
      

      TITANIUM EXAMPLE:

      var win = Ti.UI.createWindow();
      win.leftNavButtons = [
          Ti.UI.createView({backgroundColor: 'red', height: 25, width: 25}),
          Ti.UI.createView({backgroundColor: 'green', height: 25, width: 25}),
          Ti.UI.createView({backgroundColor: 'blue', height: 25, width: 25}),
      ];
      win.rightNavButtons = [
          Ti.UI.createButton({title: 'btn 1'}),
          Ti.UI.createButton({title: 'btn 2'}),
          Ti.UI.createButton({title: 'btn 3'})
      ];
       
      var navWin = Ti.UI.iOS.createNavigationWindow({window:win});
      navWin.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skypanther Tim Poulsen
                Reporter:
                bhatfield Benjamin Hatfield (Inactive)
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration