[TIMOB-2436] Android: scrollableView addView() causes exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-18T23:10:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M04 |
Components | Android |
Labels | android, defect, regression, scrollable, view |
Reporter | Paul Dowsett |
Assignee | Don Thorp |
Created | 2011-04-15T03:19:49.000+0000 |
Updated | 2011-04-18T23:10:44.000+0000 |
Description
Environment: ubuntu 9.10, Titanium 1.5.X of 27th Nov, Google 2.2.
The following code demonstrates that addView()
of
scrollableView causes an exception. I have attached a clean project
that includes the following code and the assets required. https://gist.github.com/718285">This is the exception
output.
app.js:
var window = Ti.UI.createWindow({});
var parentView = Ti.UI.createView({
backgroundColor:'blue'
});
window.add(parentView);
var cardSlider = Ti.UI.createScrollableView({
backgroundColor: '#aaa'
});
for(var i=0, ilen=5; i<ilen; i++){
Ti.API.info('Adding: /card/'+i+'.png');
var screenView = Ti.UI.createView({});
var image = Ti.UI.createImageView({
// backgroudImage used to allow image to be scaled on android
backgroundImage: '/card/'+i+'.png',
width: 222,
height: 168
});
screenView.add(image);
cardSlider.addView(screenView);
}
parentView.add(cardSlider);
window.open();
Attachments
File | Date | Size |
---|---|---|
resources.zip | 2011-04-15T03:19:50.000+0000 | 116939 |
May be a regression from the removeView patch.
(from [0eed97c26b44ed50f0b3a9de6aff83bee1553abd]) [#2436 state:fixed-in-qa] Verified unit test and test in ticket didn't crash.
Merge branch 'master' of https://github.com/dizzymonkey/titanium_mobile">https://github.com/dizzymonkey/titanium_mobile into dizzymonkey-master
https://github.com/appcelerator/titanium_mobile/commit/0eed97c26b44ed50f0b3a9de6aff83bee1553abd"> https://github.com/appcelerator/titanium_mobile/commit/0eed97c26b44...
sim 2.1, g2 2.2 Titanium SDK version: 1.5.0 (12/03/10 09:29 33c2058) using attached files no crash