[TIMOB-11981] Android: scrollableview in scrollable view does not work in SDK 3.x.x
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2012-12-06T19:16:26.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | triage |
Reporter | Tommy Leung |
Assignee | Ingo Muschenetz |
Created | 2012-11-30T15:27:10.000+0000 |
Updated | 2017-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();
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)
Tested and confirmed regression between 2.1.4 GA and 3.0 RC with Samsung Galaxy S2 2.3.6.
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.
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.
Closing ticket as the issue will not fix and with reference to the above comments.