Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2701

[ios] backgroundGradient: gradient layer resize animated when shouldnt

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: Titanium SDK & CLI
    • Labels:
    • Environment:

      Titanium 3.0.0 (master)
      ios 5.1 (simulator + device)

      Description

      If you change the size of a view which contains a gradient, the gradient layer resize gets animated

      var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
      // this test should test that we have a red 100x100 view in the 
      // center of the screen by using the size property to set it
       
      var view = Ti.UI.createView({
      	width:100,
      	height:100,
      	borderRadius:10,
      	borderWidth:2,
      	borderColor:'green',
      	backgroundGradient:{
      		type:'linear',
      		colors:[{color:'#d4d4d4',position:0.0},{color:'#c4c4c4',position:0.50},{color:'#b4b4b4',position:1.0}]
      	}
      });
       
       
      win.add(view);
       
      var label = Ti.UI.createLabel({
      	text:"Should be 100x100 red square in center",
      	textAlign:"center",
      	width:"auto",
      	height:"auto",
      	top:20
      });
       
      win.add(label);
       
       
      var button = Ti.UI.createButton({
          title:"Change Size",
          width:120,
          height:40,
          bottom:20
      });
      win.add(button);
       
      button.addEventListener('click',function() {
      	view.updateLayout({
      		width:150,
      		height:150
      	});
          label.text = "Box should now be 150x150";
      });
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mpmiranda Mauro Parra-Miranda
                Reporter:
                farfromrefuge Martin Guillon (Inactive)
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Integration