Problem description
Themes Assets images are not properly used when the image files are put in the "themes/
/assets" folder instead that in platform specific folder "themes//assets/"
Reproducible on iOS, Android and MobileWeb.
Works fine using Alloy 1.3.1 (so is a regression).
Steps to reproduce
Get the code from https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-577
1.
Run the App on iOS, Android or MobileWeb
Result: two Alloy Icons are displayed (on a red background, as correctly applied from the themes/red/styles/app.tss). Icons are the red.png and blue.png icons inside "app/assets/" folder. See screenshot_140_red.png
Expected result: a different icon should be displayed on top (the one in "app/themes/red/assets/red.png"). See screenshot_131_red.png
2.
Change config.json file:
"theme":"red"
to
"theme":"blue"
then build and run.
Result: same two Alloy Icons are displayed (on a blue background, as correctly applied from the themes/blue/styles/app.tss) . Icons are the red.png and blue.png icons inside "app/assets/" folder. See screenshot_140_blue.png
Expected result: a different icon should be displayed on bottom (the one in "app/themes/blue/assets/blue.png"). See screenshot_131_blue.png
Further steps
As explained in the description, the issue seems to be reproducible only when the Assets image files are put in the "app/themes/assets/" folder. If put in a specific platform folder, for example iphone, android or mobileweb, they work as expected.
3.
After step #2, create a platform folder, for example: "app/themes/blue/assets/mobileweb".
Run on MobileWeb.
Result: Image in "app/themes/blue/assets/mobileweb/" folder is correctly displayed (just like screenshot_131_blue.png)
PR: https://github.com/appcelerator/alloy/pull/424 Merged to master and 1_4_X Functional test: Test using the steps to reproduce above. You can also use the ALOY-577 test app. Build and check the Resources/iphone directory for the asset images. Then, change the theme name in config.json and build again. The theme assets have been replaced correctly and no orphan assets remain.
Verified fixed also using latest Alloy 1.4.0-beta2 TiSDK 3.3.0.v20140605150555 Alloy 1.4.0-beta2 Appcelerator Studio 3.3.0.201405271647 CLI 3.3.0-beta2 Closing.