Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1269] Android: Support Multi-Density and Multi-Resolution images

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:42.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M01
ComponentsAndroid
Labelsandroid, defect
ReporterDon Thorp
AssigneeDon Thorp
Created2011-04-15T02:48:11.000+0000
Updated2011-04-17T01:55:42.000+0000

Description

Splash Screen is the first that needs support and it needs to be done in the Theme. Multi-D/R images are needed through out to gracefully handle apps running on many different devices.

Comments

  1. Brion Vibber 2011-04-15

    Some doc references:
    http://developer.android.com/guide/practices/screens_support.html"> http://developer.android.com/guide/practices/screens_support.html
    http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources"> http://developer.android.com/guide/topics/resources/providing-resou...

    For resource layout:

    res/drawable-ldpi/foo.png (for 120dpi)
    res/drawable-mdpi/foo.png (for 160dpi -- default)
    res/drawable-hdpi/foo.png (for 240dpi -- nexus 1, droid)

    In general it'll be most important to have native high-DPI images (scaling down to low-res usually doesn't look as bad as scaling up to high-res).

    I'm not sure what the full implications for say loading things into ImageViews would be, but it should be pretty straightforward for the splash screen, since that's using native Android layout/theme stuff. For now in StatusNet Mobile we're manually selecting high-res alternate images based on reported DPI, and letting the ImageViews "scale" them back to their native size from logical coordinates.

    For developer-provided resources... could have 'android-hdpi', etc subdirs in Resources alongside the 'iphone' and 'android' dirs, and have those copied into the correct res/whatev dirs ?

  2. Don Thorp 2011-04-15

    Bill is actively working this ticket. We're still working through it. At the moment, images will going in android/images/[low|medium|high] and put put in the appropriate place. Scaling hi density down to medium fails if there is a gradient in the high density image for a photo it's probably ok.

  3. Bill Dawson 2011-04-15

    (from [408f5ab0fe75dcd33b48e2d893a8dc6fd0236dc8]) [#1269 state:fixed-in-qa] density-specific splash screens now supported using our 'default.png' standard. Put the different density versions i Resources/android/images/high/default.png, Resources/android/images/medium/default.png, etc. https://github.com/appcelerator/titanium_mobile/commit/408f5ab0fe75dcd33b48e2d893a8dc6fd0236dc8"> https://github.com/appcelerator/titanium_mobile/commit/408f5ab0fe75...

  4. Daniel 2011-04-15

    What about other images rather than splashscreen and icon? Such as some window or button background image, how would you target device with diff screen sizes and dpi?

    Thanks

  5. Don Thorp 2011-04-15

    @Daniel please use Q&A or Helpdesk for support. We do not provide it from our ticketing system.

JSON Source