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

Android: toImage() does not work if applied to ImageView

    Details

      Description

      Problem description

      The method toImage() does not work if applied to an ImageView. This is also true if the ImageView is child of another view.

      Steps to reproduce

      Use the following code to reproduce the issue:

      var win = Ti.UI.createWindow({backgroundColor: 'white'});
        
      var img = Ti.UI.createImageView({
          image: 'KS_nav_views.png',
          backgroundColor: 'transparent',
          width: 100,
          height: 100
      });
       
      var tmpImage = img.toImage();
      tmpImage.backgroundColor = 'transparent';
       
      var imageView = Titanium.UI.createImageView({
          width: 100,
          height: 100,
          image: tmpImage,
          top: 10,
          backgroundColor: "transparent"
      });
        
      win.add(imageView);
      win.open();
      

      Additional notes

      The same code works with SDK 3.0.0.
      If the ImageView is child of another view, and the toImage() is applied to the parent, the ImageView will not be visible as well.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwang Ping Wang
                Reporter:
                dcassenti Davide Cassenti
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration