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

iOS: backgroundGradient is taking time appearing as if some animation has been applied to the view

    Details

      Description

      Issue

      Background gradient is taking time and is applying after the window is opened appearing as if some animation has been applied to the view.

      Reproduction steps

      1. Click the button
      2. backgroundGradient is applied to the view after the window opening.
      3. Monitor how the backgroundGradient got animated

      Expected

      Ti 2.1.2.GA does not animates the backgroundGradient.

      Actual

      Ti 2.1.3.GA+, animation is performed.

      Tested on

      iOS simulator 5
      iPhone 4 - iOS 6

      Repro sequence
      • app.js

        var w = Ti.UI.createWindow({
            backgroundColor:'white'
        });
         
        var b = Ti.UI.createButton({
            title:'click'
        });
        w.add(b);
        w.open();
        var data = {
                        spName : 'Specialty',
                        id : 100,
                        name : 'Name',
                        addr : 'Address',
         
            };
        var sam = require('sam');
        b.addEventListener('click',function(e){
            new sam(data).open();
        });
        

      • sam.js

      function Request(data) {
       
      	var appointmentWindow = Titanium.UI.createWindow({
      		layout : 'vertical'
      	});
       
      	var scrollView = Ti.UI.createScrollView({
      		contentHeight : Ti.UI.SIZE,
      		bottom : 20,
      		layout : 'vertical',
      		showVerticalScrollIndicator : true
      	});
       
      	var doctorInfo = Ti.UI.createView({
      		height : Ti.UI.SIZE,
      		width : Ti.UI.FILL
      	});
      	var bgGradient_ios = {
      		type : 'linear',
      		startPoint : {
      			x : '0%',
      			y : '100%'
      		},
      		endPoint : {
      			x : '100%',
      			y : '0%'
      		},
      		colors : [{
      			color : '#2500A0DF',
      			offset : 0.75
      		}, {
      			color : '#5500A0DF',
      			offset : 0.25
      		}]
       
      	};
       
      	var doctorInfoView = Ti.UI.createView({
      		layout : 'horizontal',
      		height : Ti.UI.SIZE,
      		width : Ti.UI.FILL,
      		horizontalWrap : false,
      		top : 10,
      		backgroundGradient : bgGradient_ios,
      	});
       
      	var doctorDetail = Ti.UI.createView({
      		height : Ti.UI.SIZE,
      		left : '5%',
      		layout : 'vertical',
      		top : 7,
      		width : Ti.UI.FILL,
      		bottom : 3
      	});
       
      	doctorInfoView.add(doctorDetail);
       
      	var doctorNameLbl = Titanium.UI.createLabel({
      		text : data.name,
      		font : {
      			fontSize : 14,
      			fontWeight : 'bold',
      		},
      		color : 'black',
      		left : 0
      	});
       
      	doctorDetail.add(doctorNameLbl);
       
      	var doctorSpecialtyLbl = Titanium.UI.createLabel({
      		text : data.spName,
      		color : 'black',
       
      		left : 0,
      		font : {
      			fontSize : 12
      		}
      	});
       
      	doctorDetail.add(doctorSpecialtyLbl);
       
      	var doctorAddressLbl = Titanium.UI.createLabel({
      		text : data.addr,
      		color : 'black',
      		left : 0,
      		font : {
      			fontSize : 12
      		}
      	});
       
      	doctorDetail.add(doctorAddressLbl);
       
      	doctorInfo.add(doctorInfoView);
       
      	scrollView.add(doctorInfo);
      	appointmentWindow.add(scrollView);
       
      	return appointmentWindow;
      };
       
      module.exports = Request;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                egomez Eduardo Gomez (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration