Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13494] Android: Image View does not maintain image boundary

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2013-06-07T23:16:24.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0
Fix Version/sn/a
ComponentsAndroid
LabelsTitanium, android, exalture, mobilesdk, supportTeam
ReporterAshish Nigam
AssigneeSunila
Created2013-04-09T07:26:44.000+0000
Updated2017-03-21T22:43:25.000+0000

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(); 

Comments

  1. Soumya Kanti Kar 2013-04-16

  2. Sunila 2013-06-06

    Behavior implemented If the image is in the original size, scrolling is not allowed If the image is zoomed in, then it can be scrolled until the boundaries, images cannot be scrolled beyond the boundaries.
  3. Allen Yeung 2013-06-07

  4. Lee Morris 2017-03-21

    Closing ticket as duplicate with reference to the above comments.

JSON Source