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

[android] imageview does not respect image ratio if imageview width/height changed after creation

    Details

      Description

      If you run that code you'll see that the image ratio is not respected.

      Now to test that bug you actually need another bug fix(cause imgBlob width and height wont be set), see that ticket
      https://jira.appcelerator.org/browse/TC-1209

      var win = Ti.UI.createWindow({
          backgroundColor: 'white'
      });
       
      var fileName = "http://3.bp.blogspot.com/_Z-tqVTd9fPI/TRzjXBKIKvI/AAAAAAAACEo/wflE9APHFWE/s200/steve_jobs.jpg";
      var xhr = Titanium.Network.createHTTPClient();
        
      image = Ti.UI.createImageView({
          width:400,
          backgroundColor:'blue',
          // image:fileName,
          height:200
      });
       
      win.add(image);
       
      xhr.onload = function() {
          var imgBlob = this.responseData;
          image.width = imgBlob.width;
          image.height = imgBlob.height;
          image.image = this.responseData;
      };
      xhr.open('GET', fileName);
       
      win.open();
       
      xhr.send();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fcasali Federico Casali
                Reporter:
                farfromrefuge Martin Guillon (Inactive)
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Integration