Tuesday, February 19, 2013

Titanium Alloy and Android Resources problem

Hi!

I'm currently taking my first steps with Alloy, but I am experiencing several problems with the Android resources.

I've got this folder structure:

app - assets -- android --- images ---- high ---- medium ---- low
And I reference images like this:
"#play":{     height: Ti.UI.SIZE,     width: Ti.UI.SIZE,     backgroundColor: "transparent",     image: "/play.png",     touchEnabled: true,     top: "30dp" }
I can see that the build process copies the images into the according Android folders res/drawable-hdpi, res/drawable-mdpi ... whereas the filename has some kind of random string added to it.

The problem is the images won't show up in the Android app, neither in emulator nor on the real device.

When I run it on the emulator I get messages like: "Max retries reached, giving up decoding image source: file:///android_asset/Resources/play.png"

I don't think this is the right path to search for the images, is it?

I am on Titanium 3.1.

Thanks for your help.

Source: http://developer.appcelerator.com/question/148461/titanium-alloy-and-android-resources-problem

national weather service weather channel Rivals beyonce Kaepernick Eddie Vanderdoes finish line

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.