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

Android: Animating a view's width changes its height

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.1.3
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      TiSDK 3.1.3, Android 4.1.2

      Description

      While animating a view's width, its height also changes.
      Steps To Reproduce

      1.Here is the sample test case:

       
      var win = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
       
      var view=Ti.UI.createView({
      	left: 0,
      	top: 0,
      	width: '44dp',
      	height:'150dp',
      	backgroundColor:"#999999"
      });
       
      var label1 = Titanium.UI.createLabel({
      	color:'white',
      	text:'Tap',
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      var expanded = false;
      label1.addEventListener('singletap', function (e) {
      	var newWidth,
      		animation;
       
      	if (expanded) {
      		newWidth = '44dp';
      	} else {
      		newWidth = '250dp';
      	}
       
      	expanded = !expanded;
      	
      	animation = Ti.UI.createAnimation({
      		width: newWidth,
      		duration: 250,
      		
      	});
      	
      	view.animate(animation);
      });
       
      view.add(label1);
      win.add(view);
      win.open();
      

      2. Launch the application and click on the label 'Tap'.

      3. Height also changes with the animation of view's width.

        Attachments

          Activity

            People

            • Assignee:
              sunila Sunila
              Reporter:
              mpathak Meenakshi Pathak
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration