Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20463] Problems with too high images in iOS scrollView

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterCREATIVE KAIZEN
AssigneeUnknown
Created2016-02-23T16:16:42.000+0000
Updated2018-02-28T19:55:22.000+0000

Description

Steps to Reproduce

var win = Ti.UI.createWindow();

var scrollView = Ti.UI.createScrollView({
  backgroundColor:'#336699',
  height:200,
  layout: 'horizontal',
  scrollType: 'horizontal'
});

var image = Ti.UI.createImageView({
	image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
	height: Ti.UI.FILL
});
var image2 = Ti.UI.createImageView({
	image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
	height: Ti.UI.FILL
});
var image3 = Ti.UI.createImageView({
	image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
	height: Ti.UI.FILL
});
var image4 = Ti.UI.createImageView({
	image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
	height: Ti.UI.FILL
});
scrollView.add(image);

scrollView.add(image2);
scrollView.add(image3);
scrollView.add(image4);

win.add(scrollView);


win.open();

Actual Result

On Android there everything is working fine (android.png). On iOS if image height is higher than scrollView's, than imageView with height set to Ti.UI.FILL will be higher than scrollView and than you can scrollView in any direction(ios.png).

Expected Result

Same behaviour on both systems. No such bug on iOS.

Attachments

FileDateSize
android.png2016-02-23T16:16:46.000+000030838
ios.png2016-02-23T16:16:44.000+000034638

Comments

  1. Mostafizur Rahman 2016-02-24

    Hello, I have tested the issue you reported. If we use imageView with height set to 100% it works as expected in [android](http://postimg.org/image/i6bhqaxzz/) and [iOS](http://postimg.org/image/rlzg0o9nl/). But in iOS there is some distance between two images. *Testing Environment:* Appcelerator Command-Line Interface, version 5.2.0 Titanium SDK Version: 5.1.2.GA Platform: iOS, andriod Simulator: iphone 5/ iOS 8.0 Emulator : samsung galaxy note 3 *Test Code:*
       var win = Ti.UI.createWindow();
       
        
       
       var scrollView = Ti.UI.createScrollView({
       
         backgroundColor:'#336699',
       
         height:200,
       
         layout: 'horizontal',
       
         scrollType: 'horizontal'
       
       });
       
        
       
       var image = Ti.UI.createImageView({
       
       image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
       
       //height: Ti.UI.FILL,
       
       height: '100%',
       
       });
       
       var image2 = Ti.UI.createImageView({
       
       image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
       
       //height: Ti.UI.FILL,
       
       height: '100%',
       
       });
       
       var image3 = Ti.UI.createImageView({
       
       image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
       
       //height: Ti.UI.FILL,
       
       height: '100%',
       
       });
       
       var image4 = Ti.UI.createImageView({
       
       image: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png',
       
       //height: Ti.UI.FILL,
       
       height: '100%',
       
       });
       
       scrollView.add(image);
       
        
       
       scrollView.add(image2);
       
       scrollView.add(image3);
       
       scrollView.add(image4);
       
        
       
       win.add(scrollView);
       
       
       
       win.open();
       
       
    *Test Result:* Check [ios](http://postimg.org/image/rlzg0o9nl/), [android](http://postimg.org/image/i6bhqaxzz/).
  2. CREATIVE KAIZEN 2016-02-24

    Hello, Unexpected distance between images with '100%' is another bug, which I encountered once on Android too but couldn't reproduce.

JSON Source