Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1914] Andoird hdpi/retina images not used as backgroundImage with backgroundRepeat

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2013-06-11T16:15:15.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, backgroundimage, backgroundrepeat
ReporterMichael Gangolf
AssigneeMauro Parra-Miranda
Created2013-05-22T16:23:19.000+0000
Updated2016-03-08T07:40:50.000+0000

Description

I'm trying to make a view with a repeating background image on android. I've put double resolution images with the same name inside the res folders and the non retina image inside the asset folder (alloy project). But when I run my app its not using the double sized image so I see two lines of images. *Setup* default unit dp Android 4.0.2 SDK 3.1.0 *Images* app/assets/image.png (height: 39) app/assets/android/images/res-notlong-*-hdpi/image.png (height: 78) View
"#bgview":{
    backgroundImage: "/image.png",
    height: 39,
    backgroundRepeat: true
}
*Result* on a hdpi device (and emulator): 2 rows of my image are displayed, so its using the 39dp image and not the 78dp one. Example source code attached

Attachments

FileDateSize
appSource.zip2013-05-22T16:23:19.000+00005093049

Comments

  1. Michael Gangolf 2013-05-27

    still the same with SDK 3.1.1 RC1
  2. Marco Seguri 2013-06-04

    Is "/image.png" the valid url for hdpi devices? Shouldn't it be "/images/image.png"? EDIT: I tested your code, removing "/app/assets/bg_green.png" and using "/images/bg_green.png" in index.tss and it works.
  3. Michael Gangolf 2013-06-05

    ok, I see. thanks
  4. Mauro Parra-Miranda 2013-11-24

    Invalid issue.

JSON Source