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

Android: Image View does not maintain image boundary

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: Release 3.0.2, Release 3.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Titanium Mobile SDK, Android.

      Description

      When we zoom in or out an image in Image View using enableZoomControls property,
      then image can be slide out of the image view and there is not way to restrict this behavior.

      Steps to reproduce:

      1: Launch the sample code present in the JIRA in Android App Project
      2: Tap on the image and move your finger in any direction, for example to right. You should be able to see part image and part green.
      3: Lift up your finder.
      4: Tap on the image again and move the image to the right. Move it unless the image disappears.
      5: Lift up for your finger.

      Now you will find that the image is no longer visible. Only the green color background is visible.

      sample Code

      var win = Titanium.UI.createWindow({
          exitOnClose : true,
          navBarHidden : true
      });
       
      var parentView = Titanium.UI.createView({
          left : 0,
          top : 0,
          width : '100%',
          height : '80%',
          backgroundColor : 'red'
      });
       
      var imageView = Titanium.UI.createImageView({
          left : 0,
          top : 0,
          width : "150dp",
          height : "100dp",
          image : 'taman.jpg',
          canScale : true,
          enableZoomControls : true,
          backgroundColor : 'green'
      });
       
      imageView.addEventListener("touchmove",function(e){
      	
      });
       
      parentView.add(imageView);
      win.add(parentView);
      win.open(); 
      

        Attachments

          Activity

            People

            • Assignee:
              sunila Sunila
              Reporter:
              anigam Ashish Nigam
              Reviewer:
              Allen Yeung
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code