Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15702] Android: random contentOffset value of ScrollView when ScrollableView with TableView/ListView inside ScrollView

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterJungwook Son
AssigneeUnknown
Created2013-11-05T10:22:00.000+0000
Updated2018-02-28T20:04:10.000+0000

Description

1. scroll scrollableView 2. suddenly scrollView makes jump to some strange position 3. contentOffset(ie. scroll position) was changed, and 'scroll' event of scrollView was also triggered.
var win = Ti.UI.createWindow({
    backgroundColor : 'white',
});

var scroll = Ti.UI.createScrollView({
    layout : 'vertical'
});

var header = Ti.UI.createView({ height: 300, backgroundColor:'green' });
scroll.add(header);

var views = [];

for (var k=0; k<3; k++) {
var rows = [];
for (var i=0; i<10; i++) {
    var row = Ti.UI.createTableViewRow({ height: 48 });
    var icon = Ti.UI.createImageView({ width: 32, height: 32, image: "/appicon.png" });
    row.push(icon);
}

var table = Ti.UI.createTableView({
    data: rows,
});
views.push(table);
}


var scrollable = Ti.UI.createScrollableView({
    height : 400,
    views : views,
});

win.add(scroll);
win.open();

Comments

  1. Ingo Muschenetz 2013-11-05

    Can you explain why you need this layout? This is generally discouraged.
  2. Jungwook Son 2013-11-06

    I am using ScrollableView inside ScrollView (solved in TIMOB-13610) ScrollableView has 5 pages, and every page is consist of about 10~20 content rows. I have already implemented content part using ListView :) so I'm just interested in re-using my existing listview template. If I create new content view code (that doesn't use ListView or TableView), this problem can be solved. I have tested the latest version of 3.2.0. But this will cost me a couple of days :) Only one difference thing was, between ListView and View (in scrollableView inside scrollView), contentOffset of the outer ScrollView is changed whenever ScrollableView scrolls to the next page.

JSON Source