Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2908] Density specific folders do not work on Android

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2012-08-13T07:14:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio, Titanium SDK & CLI
Labelsandroid, density, image, splash
ReporterNauris Pukis
AssigneeFederico Casali
Created2012-03-15T13:30:05.000+0000
Updated2016-03-08T07:47:53.000+0000

Description

I would add the "sample app", but "Attachment is 16.59 MB but the largest allowed attachment is 10.00 MB". A short how-to reproduce: Create a new app with Titanium 1.8.2 (or development build 2.0, doesn't matter), don't change anything, build to actual device. Start the app in Landscape view (on a tablet device), and you have a stretched, pixelated image as your splash screen. Images that are in density specific folders are just not found, or at least the correct ones. It doesn't work by default, doesn't work with android:anyDensity property either true or false, and ti.fastdev doesn't matter as well (I have no idea why I tried). This didn't bother me until I tried my app on a tablet device.

Comments

  1. Shak Hossain 2012-03-24

    HI Nauris, Can you please send me the sample by email at shossain@appcelerator.com? Thanks,
  2. Nauris Pukis 2012-03-25

    Sent the files. Be sure to run on actual device, error may not appear in an Emulator.
  3. Shak Hossain 2012-04-12

    Hi Nauris, I have misplaced the project file you sent me. Can you please resend? Regards, Shak
  4. Nauris Pukis 2012-04-12

    I have re-sent the files now. Please not that they are just a new blank project started with Titanium. Nothing is altered. The splash screens do not work on the actual devices. Best scenario test on an Android Tablet device and launch the app while in horizontal "mode" of the tablet device. Although it is the easiest to see on Tablet devices, the fault persists over all actual devices.
  5. Federico Casali 2012-04-16

  6. Nauris Pukis 2012-04-17

    Hi Federicio, I am going to test this if it works in 2.0.1 with background.png instead. But this is not a solution, and the bug isn't fixed. I still have to do logic in my code, to get the proper density image from my images resources. For example on Android I have to count DPI and determine which pin image to select (from the ones I've added). It is not a direct relation to this issue, but I think they come from the same (some kind of) underlying issue. Regards, Nauris.
  7. Nauris Pukis 2012-04-17

    Just checked - renamed all the files to background.png - Now instead of not getting the proper size, I don't get the proper image. Instead of my splash screen I get Appcelerator default splash-screen. Not sure why, but it happened. (I cleaned the project before build, didn't help).
  8. Stephen Feather 2012-04-30

    Using a DroidX (2.3.3 Gingerbread), a default empty project (http://www.feather.us/test4_project.zip), and my set of test images (http://www.feather.us/default_image_set.zip) I was shown a 800x480 image (default.png) in landscape (res-long-land-hdpi) and a 480x800 image (default.png) in portrait (res-long-port-hdpi) as expected. TiSDK 2.0.1GA2 _wanted to add the community is welcome to steal those images for use. we assembled it to clarify end user device issues_
  9. Federico Casali 2012-05-10

    @Nauris, can you still reproduce the issue? In case you are still reproducing this issue and if you have a specific project you want to share with us but it's too big, you can also use Dropbox or sent me by email (fcasali@appcelerator.com). Please keep in mind to delete files under 'build' folder in order to keep the app size smaller. Thanks for the feedback
  10. Federico Casali 2012-08-13

    Closing as invalid due to Stephen feedback and age with no reply.

JSON Source