[AC-1914] Andoird hdpi/retina images not used as backgroundImage with backgroundRepeat
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-06-11T16:15:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, backgroundimage, backgroundrepeat |
Reporter | Michael Gangolf |
Assignee | Mauro Parra-Miranda |
Created | 2013-05-22T16:23:19.000+0000 |
Updated | 2016-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
File | Date | Size |
---|---|---|
appSource.zip | 2013-05-22T16:23:19.000+0000 | 5093049 |
still the same with SDK 3.1.1 RC1
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.
ok, I see. thanks
Invalid issue.