Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19438] Windows: ScrollView contentOffset doesn't work

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-08-31T22:59:52.000+0000
Affected Version/sRelease 4.0.0
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2015-08-31T09:28:32.000+0000
Updated2017-03-16T21:58:41.000+0000

Description

ScrollView.contentOffset doesn't work.
var win = Ti.UI.createWindow({ backgroundColor: 'blue' });

var scrollView = Ti.UI.createScrollView({
    showVerticalScrollIndicator: true,
    showHorizontalScrollIndicator: true,
    height: '100%',
    width: '100%',
    contentHeight: 1000
});

var view1 = Ti.UI.createView({
    backgroundColor: 'red',
    width: 185, height: 185,
    top: 100
});
var imageview1 = Ti.UI.createImageView({
    image: 'http://image.tmdb.org/t/p/w780//3FweBee0xZoY77uO1bhUOlQorNH.jpg',
    top: -20, left: -185,
    width: 555, height: 312
});
view1.add(imageview1);

var view2 = Ti.UI.createView({
    backgroundColor: 'red',
    width: 185, height: 185,
    top: 550
});
var imageview2 = Ti.UI.createImageView({
    image: 'http://image.tmdb.org/t/p/w780//oYZtd7Md78HuzBvT5dlJlHWc89O.jpg',
    top: -20, left: -185,
    width: 555, height: 312
});
view2.add(imageview2);

scrollView.add(view1);
scrollView.add(view2);

scrollView.contentOffset = { x: 0, y: 100 };

win.add(scrollView);
win.open();

Comments

  1. Kota Iguchi 2015-08-31

    https://github.com/appcelerator/titanium_mobile_windows/pull/422
  2. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source