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

iOS: View: Hiding a view do not shifts all the views below, up on the screen.

    Details

      Description

      This is a regression. It works fine on 2.1.0.

      Steps to reproduce
      1. Use the app below

      var win = Ti.UI.createWindow({backgroundColor:'black'});
       
      var scrollView = Ti.UI.createScrollView({
          layout:'vertical',
          contentHeight:'auto',
          top:0,bottom:0,left:0,right:0
      });
      win.add(scrollView);
      win.open();
       
      var len = 2;
       
      for(var i = 0; i < len; i++){
          scrollView.add(
              Ti.UI.createView({
                  top:5,
                  left:20,
                  right:20,
                  backgroundColor:'white',
                  height:80
              })
          );
      }
       
      var magicView = Ti.UI.createView({
          top:5,
          left:30,
          right:30,
          backgroundColor:'red',
          height:100
      });
      var viewThatWillGetPushedToTheTop = Ti.UI.createView({
          top:5,
          left:30,
          right:30,
          backgroundColor:'green',
          height:100
      });
       
      scrollView.add(magicView);
      scrollView.add(viewThatWillGetPushedToTheTop);
       
      for(var i = 0; i < len; i++){
          scrollView.add(
              Ti.UI.createView({
                  top:5,
                  left:20,
                  right:20,
                  backgroundColor:'white',
                  height:80
              })
          )
      }
       
      scrollView.add(Ti.UI.createView({backgroundColor:'blue',height:100,top:10}))
       
      setTimeout(function(){
          magicView.hide();
          viewThatWillGetPushedToTheTop.top -= magicView.height
      },4000);
      

      2) Run the app on iOS simulator

      Expected result:
      1) Should see a simple window with a scrollView. In the scrollView there are two white views, a red view, a green view, two more white views, and a blue one. After a 4 second timer, the red view is removed and the green view along with all the below white and blue views are pushed up. When this happens, the blue one (which is 100px height) should not cut off at the middle.

      Actual result:
      1) A simple window with a scrollView is displayed. In the scrollView there are two white views, a red view, a green view, two more white views, and a blue one. After a 4 second timer, the red view is removed and the green view is pushed up. When this happens, the blue one (which is 100px height) is not cut off at the middle. But the white views (which are below green view) and the blue view are not moved up after removal to red view.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mstepanov Max Stepanov
                Reporter:
                sbhadauria Shyam Bhadauria
                Reviewer:
                Vishal Duggal (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-5606
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code