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

Android:Extra padding if enableZoomControl is true for imageView on 8.2.0.GA

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Won't Do
    • Affects Version/s: Release 8.2.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:
    • Story Points:
      1

      Description

      The customer has a requirement where they need to display an image inside a scrollview and provide zoom controls for that image. But they are able to see the extra spacing at top and bottom of the image. If the "enableZoomControls" is set to false, image displayed properly without any extra spaces. Currently they are using 8.0.2.GA SDK.
      Note: We tested the issue on 8.2.0.GA, Huawei Gr3 2017(Android 7) and the issue is reproduced on our end.

      Test steps:

      • Create a classic project
      • Download the image file and paste it on resources
      • Paste the sample code to app.js
      • Run the project on device. After running, we are able to see the extra spacing at top and bottom of the image.

      Test Code:

       
      var win = Ti.UI.createWindow({
       
              backgroundColor: '#fff',
       
              layout : 'vertical'
       
          });
       
          var scrollView = Ti.UI.createScrollView({
       
          layout : 'vertical',
       
          width : Ti.UI.FILL,
       
      contentWidth : '100%',
       
      height : Ti.UI.FILL
       
          });
       
          var imageViewContainer = Ti.UI.createView({
       
      height : Ti.UI.SIZE,
       
      width : Ti.UI.SIZE,
       
      });
       
          var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,'test.png');
       
          imageViewContainer.add(Ti.UI.createImageView({
       
          image : file,
       
          width:Ti.UI.SIZE,
       
          height:Ti.UI.SIZE,
       
          enableZoomControls : true,
       
          borderColor:'red'
       
          }));
       
          scrollView.add(imageViewContainer);
       
      win.add(scrollView);
       
      win.open();
      
      

      Test Output:
      "enableZoomControls" is true:

      "enableZoomControls" is false:

        Attachments

        1. after_scroll_nexus.png
          after_scroll_nexus.png
          255 kB
        2. after_scroll_pixel.png
          after_scroll_pixel.png
          203 kB
        3. before_scroll_nexus (1).png
          before_scroll_nexus (1).png
          249 kB
        4. before_scroll_pixel.png
          before_scroll_pixel.png
          709 kB
        5. Screenshot_20191010-155205.png
          Screenshot_20191010-155205.png
          222 kB
        6. Screenshot_20191010-155604.png
          Screenshot_20191010-155604.png
          227 kB
        7. test.png
          test.png
          306 kB

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rmitro Rakhi Mitro
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code