Image resources for different devices and resolutions

You must Login before you can answer or comment on any questions.

Hello all

I am trying to build an application that has as image resources a set of icons, numbered from 1 to ... say 10. I have different icons for different resolutions - that is three types of icons: mdpi (x1), hdpi (x1.5) and retina (x2). I want to store these icons in a folder called "icons" (a folder for each resolution).

Where should I put this folder in my Appcelerator project and how should I name it to make it available for mdpi/hdpi?

  • if I put the folder in the "/Resources" folder, I can't use different resolutions. Of course, on iPhone it works (because of the naming convention @2x) but what about Android?
  • if I put the folder in the "/Resources/iphone" and "/Resources/android", the folder isn't available in the binary package on either platforms

Honestly, I'm out of ideas on this.

2 Answers

Accepted Answer

you have this command Titanium.Platform.DisplayCaps. who gives you servera data about the screen you are using and you can make a teste to link each screen with right image folder

for the directory it's /ressource folder for android you have to teste in your app with display.caps witch screen you are using and change the forlder on the app

Your Answer

Think you can help? Login to answer this question!