Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18575] RightNavButtons should be rendered from left to right

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsTiAPI
LabelsrightNavButtons
ReporterFokke Zandbergen
AssigneeUnknown
Created2015-02-14T14:47:56.000+0000
Updated2018-02-28T19:55:41.000+0000

Description

The order in which you push buttons to an array for rightNavButtons do not correspondent (in a logical way) with the order in which they are rendered.

To reproduce

Take this Alloy example (it is not an Alloy bug, it's just more clear):
<Alloy>
  <NavigationWindow>
  	<Window title="Title">
  		<LeftNavButtons>
        <Button>A</Button>
        <Button>B</Button>
      </LeftNavButtons>
      <RightNavButtons>
        <Button>C</Button>
        <Button>D</Button>
      </RightNavButtons>
  	</Window>
  </NavigationWindow>
</Alloy>
Which compiles to:
    $.__views.__alloyId0 = Ti.UI.createWindow({
        title: "Title",
        id: "__alloyId0"
    });
    var leftNavButtons = [];
    $.__views.__alloyId2 = Ti.UI.createButton({
        title: "A",
        id: "__alloyId2"
    });
    leftNavButtons.push($.__views.__alloyId2);
    $.__views.__alloyId3 = Ti.UI.createButton({
        title: "B",
        id: "__alloyId3"
    });
    leftNavButtons.push($.__views.__alloyId3);
    $.__views.__alloyId0.leftNavButtons = leftNavButtons;
    var rightNavButtons = [];
    $.__views.__alloyId5 = Ti.UI.createButton({
        title: "C",
        id: "__alloyId5"
    });
    rightNavButtons.push($.__views.__alloyId5);
    $.__views.__alloyId6 = Ti.UI.createButton({
        title: "D",
        id: "__alloyId6"
    });
    rightNavButtons.push($.__views.__alloyId6);
    $.__views.__alloyId0.rightNavButtons = rightNavButtons;
You'd expect the window to have A+B on the left and then C+D on the right, but instead you see A+B on the left and D+C on the right. See screenshot.

Attachments

FileDateSize
iOS Simulator Screen Shot 14 Feb 2015 15.46.30.png2015-02-14T14:47:56.000+000017071

Comments

No comments

JSON Source