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

Windows: Layout does not match with view size property

    Details

    • Type: Bug
    • Status: In Review
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: Release 8.0.0
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      8
    • Sprint:
      2019 Sprint 11, 2019 Sprint 12, 2019 Sprint 13, 2019 Sprint 14, 2019 Sprint 16, 2019 Sprint 23

      Description

      Following code reports height=200 (which is right) but the viewChild red view does not display 200 height actually. It looks to have 100 height.

      var view = Ti.UI.createView({
          height: 200,
          width: 200,
          backgroundColor: 'yellow'
      }),
          viewChild = Ti.UI.createView({
              backgroundColor: 'red',
              center: {
                  x: 100,
              },
              right: 50
          });
      var win = Ti.UI.createWindow();
      viewChild.addEventListener('postlayout', function () {
          console.log('height=' + viewChild.size.height);
      });
      view.add(viewChild);
      win.add(view);
      win.open();
      

      Expected: viewChild should display 200 height.

      Same thing happens on width property.

      var view = Ti.UI.createView({
          height: 200,
          width: 200,
          backgroundColor: 'yellow'
      }),
          viewChild = Ti.UI.createView({
              backgroundColor: 'red',
              center: {
                  y: 100,
              },
              bottom: 50
          });
      var win = Ti.UI.createWindow();
      viewChild.addEventListener('postlayout', function () {
          console.log('width=' + viewChild.size.width);
      });
      view.add(viewChild);
      win.add(view);
      win.open();
      

      Expected: viewChild should display 200 width.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                kiguchi Kota Iguchi
                Reviewer:
                Gary Mathews
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Source Code