[TIMOB-2176] Android - custom slider crashes (device and sim)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:58:19.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, crash, defect, usability |
Reporter | Thomas Huelbert |
Assignee | Don Thorp |
Created | 2011-04-15T03:12:48.000+0000 |
Updated | 2011-04-17T01:58:19.000+0000 |
Description
Using the following script and TiMobile 1.5.0.70ce98 g2 running 2.2 crashes on load.
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var customSlider = Titanium.UI.createSlider({
min:0,
max:100,
value:25,
width:268,
height:40,
top:90,
thumbImage: 'images/custom-slider-handle.png',
leftTrackImage: 'images/custom-slider-left.9.png',
rightTrackImage: 'images/custom-slider-right.9.png'
}); win.add(customSlider);
win.open();
pastie crash log: http://pastie.org/1241601">http://pastie.org/1241601
We verified that this was a test issue, but I don't like having a crash so I updated the code to correctly report an error in the log if the images are missing and fall back to the standard slider.
There should be a message for each missing image telling you that it's the thumb, left, or right and where it tried to locate the image.
(from [8bc11b39ba40d41581da9cff2e31e2002170a3f3]) [#2100 state:fixed-in-qa] Ported slider minRange/maxRange support from android_native_refactor. Added example in KitchenSink for Android support. Added messages instead of crashing for [#2176 state:fixed-in-qa] also fixed a bug that surfaced when fixing 2176 where a drawable w/ a null bitmap was created. http://github.com/appcelerator/titanium_mobile/commit/8bc11b39ba40d41581da9cff2e31e2002170a3f3"> http://github.com/appcelerator/titanium_mobile/commit/8bc11b39ba40d...
regression tested android 1.6
regression tested android 2.1