[ALOY-1318] DefaultIcon(-platform).png should be theme-able
|Affected Version/s||alloy 1.7.17|
|Fix Version/s||CLI Release 6.3.0|
|Assignee||Feon Sua Xin Miao|
/DefaultIcon.pngwhich has platform specific versions at
/DefaultIcon-<platform>.pngshould be theme-able via Alloy. We probably need a similar approach as with
platformsince we can't overwrite the
DefaultIcon.pngin the project root, so we have to do it at build-time. - https://github.com/appcelerator/alloy/pull/662/files#diff-ddbdb7300fa15590afdfee9246ac61fcR327 - https://github.com/appcelerator/alloy/pull/662/files#diff-6487ccfa4909144bbc33134e4d85bdddR159 Kindly pointed out by [~jasonkneen]: https://twitter.com/jasonkneen/status/654326054488834048
- Fokke Zandbergen 2015-10-14 /CC [~cbarber] [~fmiao]
- Tim Poulsen 2015-10-14 I believe the context for the request was Alloy-themable. Not Android themes as stated in the description.
- Jason Kneen 2015-10-14 Yes Alloy themable since auto-generating icons from DefaultIcon.png is a new feature for iOS (I believe).
- Fokke Zandbergen 2015-10-14 Typo :)
- Ricardo Pereira 2015-12-14 I think that not only DefaultIcon, but GooglePlay, GooglePlayFeature, iTunesConnect, MarketplaceArtwork and MarketplaceArtworkFeature png image files on root folder, also should be theme-able. ex: app/themes/mytheme/GooglePlay.png app/themes/othertheme/MarketplaceArtwork.png
- Fokke Zandbergen 2015-12-14 [~ricardo_jcp] those don't end up in the app itself so sure - you can keep them in the theme folder and select from there as you work in iTunesConnect and Goole Play.
- Ricardo Pereira 2015-12-14 Ok, so the only root image used while compiling it's the DefaultIcon?
- Fokke Zandbergen 2015-12-14 Correct, the others you list are for you to upload manually to iTunesConnect and Google Play.
- Ricardo Pereira 2015-12-14 Ok, thanks, just one more doubt, what about android platform resolution icons? ex: platform/android/res/drawable-hdpi
- Fokke Zandbergen 2015-12-14 Those can already be themed. Just have a platform folder in your theme folder.
- Uriel Lizama 2015-12-18 Is there any roadmap for this?
- Feon Sua Xin Miao 2015-12-18 Hello [~ulizama], we are working on it! :)
- Uriel Lizama 2016-02-22 Hello, It's been a couple of months without a solution for this issue. Is there a timeframe on when this is going to be addressed? Can you suggest a workaround in the meantime? I have a project where I have about 12 different themes which are completely different apps, so I need each to have their own icon. This has made using the newer SDKs really hard as I have to do manual work before I compile. Thanks
- Jerod Fritz 2016-02-22 I have the same situation. I manually copy the DefaultIcon.png to project root from the the theme folder where I store it temporarily. Would really like to have the current theme folder included in the search path. I've deployed the wrong icon a handful of times now just by forgetting that step.
- Chris Barber 2016-02-22 Thanks for the bump guys. We're looking into this. Just need to figure out who will and when implement this.
- Jason Kneen 2016-02-22 Added support in TiTh for this as a workaround https://github.com/jasonkneen/tith
- Jerod Fritz 2016-02-22 Support for this is available on Jason's TiCh as well here https://github.com/jasonkneen/TiCh
- Fokke Zandbergen 2016-03-23
[~cbarber] I guess we can do this similar as ALOY-1365 now, by moving
appfolder for Alloy?
- Chris Barber 2016-03-23 [~fokkezb] Sure. I don't have the bandwidth to fix it right now. If you have the time, send a fix and I'll test/merge.
- Ricardo Pereira 2017-01-08 Any plans on this ticket?
- Feon Sua Xin Miao 2017-08-24
For themed project,
app/themes/<theme>/DefaultIcon.pngwill be copied to project root by alloy compile. If theme doesn't exist or no theme is configured,
app/DefaultIcon.pngwill be copied. This does require existing apps to move
DefaultIcon.pngfrom project root to
- Abir Mukherjee 2017-10-10 Passed validation using Alloy 1.10.5 Node Version: 6.10.3 NPM Version: 3.10.10 Mac OS: 10.13 Appc CLI: 6.3.0-master.7 Appc CLI NPM: 4.2.9 I followed the instruction here: http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes
- Feon Sua Xin Miao 2017-10-20
Update to not break current usage.
1. Exiting apps, default icons exist under project root, no change.
2. To use the new feature, enable theme under
app/config.json, add default icons under
app/themes/<theme>. *Test Steps* 1. Create an app, default icons exists under project root, alloy compile shouldn't error out, note the default icon use. 2. Add theme to the app, do no app default icon under theme, alloy compile shouldn't error out, default icon used should be the same as in step 1. 3. Add default icon to theme, alloy compile shouldn't error out, default icon under selected theme is used. 4. Add another theme with default icon, select the new theme, alloy compile shouldn't error out, default icon under selected theme is used. 5. Disable theme, alloy compile shouldn't error out, default icon used should be the same as in step 1.
- Abir Mukherjee 2017-10-23 FR passed. PR merged, and changes are seen in CLI 6.3.0-master.16.
- Creative 2018-02-28
hi, why isnt this documented anywhere? I have no clue what the compiler does now with a file in
app/themes/mytheme/DefaultIcon.png. In additon, why does every change to Alloy or Titanium have to be backwards compatible? It introduces so much scenario specific code that it will likely create bugs.
- Creative 2018-02-28
- Have the file
/app/themes/mytheme/DefaultIcon.png- Have no
/DefaultIcon.pngin your project - Use "mytheme" as the app theme in
appc ti build ...- On the first compile, a
/DefaultIcon.pngseems to be copied - On the second compile (right after the first), a
/app/DefaultIcon.pngseems to be copied