Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2033] Android: Slider not checking app resources to fetch its drawables

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:52.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M02
ComponentsAndroid
Labelsandroid, defect, release-1.6.0
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:08:39.000+0000
Updated2011-04-17T01:57:52.000+0000

Description

Failcase: create a new app, put this as its app.js:

Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#fff',
    fullscreen: true,
    exitOnClose: true,
    url: 'win.js'
});

var slider = Ti.UI.createSlider( {
    left: 40, right: 40,
    thumbImage: "images/KS_nav_ui.png", min: 1, max:100
});
win.add(slider);
win.open();

In your Resources/android folder, create a folder images/medium. Move (not copy) the KS_nav_ui.png from Resources to Resources/android/images/medium.

Run the app, and you'll see there is no thumb graphic visible on the slider.

Attachments

FileDateSize
slidersammy.zip2011-04-15T03:08:39.000+0000143882

Comments

  1. Bill Dawson 2011-04-15

    (from [e1560fca323b87072aa4ddfd19a261421b1196a7]) [#2033 state:fixed-in-qa] Call loadDrawable variant that accepts TiContext as first arg so as to get access to activity resources http://github.com/appcelerator/titanium_mobile/commit/e1560fca323b87072aa4ddfd19a261421b1196a7"> http://github.com/appcelerator/titanium_mobile/commit/e1560fca323b8...

  2. Bill Dawson 2011-04-15

    (from [b7f4e4073728e82daae654bf27039099f77b841a]) [#2033 state:fixed-in-qa] Call loadDrawable variant that accepts TiContext as first arg so as to get access to activity resources http://github.com/appcelerator/titanium_mobile/commit/b7f4e4073728e82daae654bf27039099f77b841a"> http://github.com/appcelerator/titanium_mobile/commit/b7f4e4073728e...

  3. Bill Dawson 2011-04-15

    (from [2e1eebdceb7bca721cac541fdb78d1672e05b9fb]) [#2033 state:fixed-in-qa] To avoid the bug that created this ticket, hide the versions of loadDrawable that don't accept TiContext as first arg, as they are now used only internally to the TiFileHelper module http://github.com/appcelerator/titanium_mobile/commit/2e1eebdceb7bca721cac541fdb78d1672e05b9fb"> http://github.com/appcelerator/titanium_mobile/commit/2e1eebdceb7bc...

  4. Thomas Huelbert 2011-04-15

    hey Bill, I wonder if I am doing something wrong as following your steps? I am not seeing a slider on the device or in the simulator. I had to comment out "url: 'win.js'" not sure if that would affect the test? Mobile sdk 1.5.0.02c264

  5. Bill Dawson 2011-04-15

    Yeah, this works fine for me. I've attached my project for testing if you wish to use it.

  6. Thomas Huelbert 2011-04-15

    thanks Bill I guess I was being a gigantic maroon
    [INFO] Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06) droid 1 (2.2.1) sim 2.1

JSON Source