Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11981] Android: scrollableview in scrollable view does not work in SDK 3.x.x

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2012-12-06T19:16:26.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelstriage
ReporterTommy Leung
AssigneeIngo Muschenetz
Created2012-11-30T15:27:10.000+0000
Updated2017-03-22T18:04:58.000+0000

Description

*Problem description* To have a scrollable view inside a scrollable view in android, you have to create a horizontal scroll view to intercept the event. The following code is working in 2.x.x but does not work in 3.x.x (the yellow child scroll view does not scroll). *Test case*
var win = Ti.UI.createWindow({
	backgroundColor : 'white'
});

var sv1 = Ti.UI.createView();
sv1.add(Ti.UI.createLabel({
	text : 'scrollable view 1'
}));

var sv2 = Ti.UI.createView();
sv2.add(Ti.UI.createLabel({
	text : 'scrollable view 2'
}));

var sv3 = Ti.UI.createView();
sv3.add(Ti.UI.createLabel({
	text : 'scrollable view 1'
}));

var sv4 = Ti.UI.createView();
sv4.add(Ti.UI.createLabel({
	text : 'scrollable view 2'
}));

var scrollableview1 = Ti.UI.createScrollableView({
	views : [sv1, sv2]
});

var scrollableview2 = Ti.UI.createScrollableView({
	views : [sv3, sv4]
});

var horzScroll = Ti.UI.createScrollView({
	canCancelEvents : false,
	top : 0,
	height : 100,
	contentWidth : 'auto',
	scrollType : 'horizontal',
	backgroundColor : 'yellow'
});

sv1.add(horzScroll);

horzScroll.add(scrollableview2);

win.add(scrollableview1);

win.open();

Comments

  1. Tommy Leung 2012-12-03

    A use case for this is to emulate scrollable tabs in Gingerbread. The outer scrollable view would be for the tabs and the inner one for displaying data (which could be something like a gallery of scrollable images)
  2. Daniel Sefton 2012-12-06

    Tested and confirmed regression between 2.1.4 GA and 3.0 RC with Samsung Galaxy S2 2.3.6.
  3. Daniel Sefton 2012-12-06

    Sorry Tommy, we have discussed this and concluded this is a "won't fix" issue. This in fact shouldn't have originally worked in 2.1.X. Cheers.
  4. Tommy Leung 2012-12-06

    That's fine. But there is no work around? So basically there's no way to have scrollable views in scrollable views. Which means we have to scrap our app or remove the feature? Doesn't seem right to remove a working feature without providing an alternate method.
  5. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source