Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7827] Android: Add support for extrahigh density (320 dpi) devices

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-29T07:58:14.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 22, 2013 Sprint 22 Core, Release 3.2.0
ComponentsAndroid
Labels3.2.1, SupportTeam, androidbuild, cb-verified, module_android, triage
ReporterShawn Lipscomb
AssigneeChris Barber
Created2012-02-24T08:11:25.000+0000
Updated2017-06-27T23:27:56.000+0000

Description

Request

Android devices with dpi of 320 are now appearing on the market. Titanium Studio supports low (120 dpi), medium (160 dpi), and high (240 dpi) images via the \Resources\android\images\ directory's low, medium, and high subdirectories. This request is for a new *extrahigh* subdirectory to be supported during the build process, which would map to the appropriate res\drawable-*xhdpi*\ directory. We would also need support for extrahigh density splash screens, presumably in directories like \Resources\android\images\res-notlong-port-*xhdpi*, etc.

Relevant Q&A

[http://developer.appcelerator.com/question/128278/xdpi-android-res-supported]

Comments

  1. Russell Frank 2012-07-10

    You can support higher resolution devices just by building against a newer version of the Android SDK. Try putting this in your tiapp.xml: <tool-api-level>11</tool-api-level> This will still work on older devices; I've been testing my app on 2.3, 2.2 and 4.0 devices, and despite building against API level 11 it works fine. However, what we do need for xhdpi device support is higher resolution versions of the images packaged with the framework, such as ./titanium/src/java/org/appcelerator/titanium/res/drawable/btn_more_48.png On an xhdpi device (such as the Galaxy Nexus) the check marks appear tiny.
  2. Shawn Lipscomb 2012-07-10

    Russell, my Titanium apps will run on extrahigh density devices, even without the tool-api-level setting you suggest. The problem is that larger glyphs, made for extrahigh density devices like the Galaxy Nexus, which are twice the size of the medium-density glyphs, cannot be shown on these new deivces yet. The request is specifically for a new *extrahigh* subdirectory (\Resources\android\images\extrahigh\) to be supported so that I can throw my extrahigh density assets in there, just like I can place high density assets in the \Resources\android\images\high\ directory. This is part of the Titanium build process. The request also pursues support for extrahigh density splash screens in directories like \Resources\android\images\res-notlong-port-xhdpi\, etc. This is also part of the Titanium build process.
  3. Russell Frank 2012-07-10

    No, this is part of the Android resource packaging process. The res-xhdpi folders are only supported with a newer tool API level. Yes, apps built against API level 8 will run on newer devices; but in order to package xhdpi and xlarge assets, you must build with at least tool level 11.
  4. Shawn Lipscomb 2012-07-10

    Russell, are you telling me that I can drop extrahigh density (320 dpi) images in \Resources\android\images\extrahigh\ right now, change my tool-api-level to 11, and my new images will be used when the app runs on a Galaxy Nexus? I don't think so.
  5. Russell Frank 2012-07-10

    It works for me in the res- directories, I'm not sure about extrahigh. I have high resolution assets in: Resources/android/images/res-normal-xhdpi/ Resources/android/images/res-xhdpi/ etc, and it works. The extrahigh directory might be copied into a res- directory (for packaging by the Android tooling) by the Titanium tooling -- if so, then you're right, this does need to be fixed in Titanium. But the res- prefixed directories definitely work when building with tool level 11 - I've confirmed this on device.
  6. Shawn Lipscomb 2012-09-13

    ^^ This works. I added {noformat}11{noformat} \\ to my TiApp.xml file, and put my extrahigh images in this directory: {noformat}Resources/android/images/res-xhdpi/{noformat}
  7. Shawn Lipscomb 2013-03-12

    If this is the way extrahigh assets are supposed to be included in a project, then the documentation needs to be udpated.
  8. Djamel ZAHAL 2013-07-10

    is this bug corrected ? im using sdk 3.0.0 i added ~~~~~ 11 ~~~~~~ and i have images in res-xhpdi but they are not considered... any suggestions ? thanks
  9. Ingo Muschenetz 2013-07-10

    [~djamel.zahal] No. The bug is still unresolved. It is scheduled to be fixed in 3.2.0.
  10. Eduardo Gomez 2013-09-09

    [~ingo], Will be the feature able to supply XXHDPI launcher icons for an Android tablet release? Considering Google+ link below, 'drawable-xxhdpi' would fit into XHDPI bucket: {quote} The gorgeous screen on the Nexus 10 falls into the XHDPI density bucket. On tablets, Launcher uses icons from one density bucket up [0] to render them slightly larger. To ensure that your launcher icon (arguably your apps most important asset) is crisp you need to add a 144*144px icon in the drawable-xxhdpi or drawable-480dpi folder. {quote} - https://plus.google.com/+NickButcher/posts/ePQya3KsTjW
  11. Chris Barber 2013-10-05

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/4760
  12. Chris Barber 2013-10-29

    Fixed as apart of new Android build.
  13. Lokesh Choudhary 2013-12-12

    Verified with icons for high density devices & the tests were successfull/ Environment: Appcel Studio : 3.2.0.201312101708 Ti SDK : 3.2.0.v20131210191510 Mac OSX : 10.8.5 Alloy : 1.3.0-cr CLI - 3.2.0-cr Samsung Galaxy S4 running android 4.2.2 Nexus 5 - android 4.4
  14. Shawn Lipscomb 2013-12-12

    So with this update, is Resources/android/images/res-xhdpi/ the correct place to put these images? Is there a tool-api-level requirement?

JSON Source