[ALOY-1318] DefaultIcon(-platform).png should be theme-able
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-10-23T11:45:38.000+0000 |
Affected Version/s | alloy 1.7.17 |
Fix Version/s | CLI Release 6.3.0 |
Components | Themes |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Feon Sua Xin Miao |
Created | 2015-10-14T16:46:43.000+0000 |
Updated | 2018-02-28T14:16:28.000+0000 |
Description
The new
/DefaultIcon.png
which has platform specific versions at /DefaultIcon-<platform>.png
should be theme-able via Alloy.
We probably need a similar approach as with i18n
and platform
since we can't overwrite the DefaultIcon.png
in 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
/CC [~cbarber] [~fmiao]
I believe the context for the request was Alloy-themable. Not Android themes as stated in the description.
Yes Alloy themable since auto-generating icons from DefaultIcon.png is a new feature for iOS (I believe).
Typo :)
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
[~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.
Ok, so the only root image used while compiling it's the DefaultIcon?
Correct, the others you list are for you to upload manually to iTunesConnect and Google Play.
Ok, thanks, just one more doubt, what about android platform resolution icons? ex: platform/android/res/drawable-hdpi
Those can already be themed. Just have a platform folder in your theme folder.
Is there any roadmap for this?
Hello [~ulizama], we are working on it! :)
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
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.
Thanks for the bump guys. We're looking into this. Just need to figure out who will and when implement this.
Added support in TiTh for this as a workaround https://github.com/jasonkneen/tith
Support for this is available on Jason's TiCh as well here https://github.com/jasonkneen/TiCh
[~cbarber] I guess we can do this similar as ALOY-1365 now, by moving
DefaultIcon.png
into theapp
folder for Alloy?[~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.
Any plans on this ticket?
PR: https://github.com/appcelerator/alloy/pull/844 For themed project,
app/themes/<theme>/DefaultIcon.png
will be copied to project root by alloy compile. If theme doesn't exist or no theme is configured,app/DefaultIcon.png
will be copied. This does require existing apps to moveDefaultIcon.png
from project root to/app
directory.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
PR: https://github.com/appcelerator/alloy/pull/856 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 underapp/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.FR passed. PR merged, and changes are seen in CLI 6.3.0-master.16.
hi, why isnt this documented anywhere? I have no clue what the compiler does now with a file in
app/DefaultIcon.png
or/DefaultIcon.png
orapp/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.Odd behaviour: - Have the file
/app/themes/mytheme/DefaultIcon.png
- Have no/app/DefaultIcon.png
or/DefaultIcon.png
in your project - Use "mytheme" as the app theme inapp/config.json
- Runappc ti build ...
- On the first compile, a/DefaultIcon.png
seems to be copied - On the second compile (right after the first), a/app/DefaultIcon.png
seems to be copied