Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24308

Android: Child view's percent width incorrect of horizontal layout parent view (6.1.0 regression)

    Details

    • Story Points:
      3
    • Sprint:
      2017 Sprint 02 SDK

      Description

      This error occurred at Ti.SDK 6.1.0.v20170103224205, 6.1.0.v20170111010012, 6.1.0.v20170112013001, etc.
      But, not occurred at Ti.SDK 6.1.0.v20161222061413
      Of course, there is no problem with the GA version.

      This code has problem.
      https://github.com/appcelerator/titanium_mobile/pull/8720
      ( https://jira.appcelerator.org/browse/TIMOB-24243 )

      Sample Code

      var win = Ti.UI.createWindow({
          backgroundColor: '#fff'
      });
       
      var view = Ti.UI.createView({
        height: Ti.UI.FILL,
        width: Ti.UI.FILL,
        layout: "horizontal",
        backgroundColor: "gray"
      });
       
      var view1 = Ti.UI.createView({
        width: "25%",
        height: Ti.UI.FILL,
        backgroundColor: "red"
      });
       
      var view2 = Ti.UI.createView({
        width: "25%",
        height: Ti.UI.FILL,
        backgroundColor: "green"
      });
       
      var view3 = Ti.UI.createView({
        width: "25%",
        height: Ti.UI.FILL,
        backgroundColor: "blue"
      });
       
      var view4 = Ti.UI.createView({
        width: "25%",
        height: Ti.UI.FILL,
        backgroundColor: "yellow"
      });
       
      view.add(view1);
      view.add(view2);
      view.add(view3);
      view.add(view4);
       
      win.add(view);
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                engross Dongwoo Gim
                Reviewer:
                Andy Waldman
                Tester:
                Andy Waldman
              • Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code