[TIMOB-8507] Android: density specific resolution images for launcher icon are not used
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-01-22T00:27:14.000+0000 |
Affected Version/s | Release 1.7.6, Release 1.8.2, Release 2.1.3, Release 1.8.3 |
Fix Version/s | 2013 Sprint 02 API, 2013 Sprint 02 |
Components | Android |
Labels | SupportTeam, api |
Reporter | Federico Casali |
Assignee | Ping Wang |
Created | 2012-04-03T13:56:44.000+0000 |
Updated | 2017-03-31T20:50:00.000+0000 |
Description
Problem description
Density specific launcher icons are not used. Icons included in platform/res/drawable-Steps to reproduce
As described in https://wiki.appcelerator.org/display/guides/Using+density-specific+resources+on+Android#Usingdensity-specificresourcesonAndroid-Theappicon , folders for specific icons resolutions are created. Different versions of myAppicon.png file is put inside each folder, however only the file icon specified in TiAPP.xml (Additional notes
Customer ticket link: http://support-admin.appcelerator.com/display/APP-536715Attachments
File | Date | Size |
---|---|---|
timob8507.zip | 2013-01-22T00:26:36.000+0000 | 3834070 |
HD ticket: http://support.appcelerator.com/tickets/APP-536715
The filename (other than appicon.png) listed in the
Still a problem in SDK 2.1.0.GA.
I just ran into this issue. I have all my launcher icons setup in the platform directory, but Titanium is still requiring that the launcher icon ALSO exists in the /Resources/Android/ directory as well.
Ping, please take a look at the detail in the HD ticket referenced above.. Part of this problem is that the actual icon name listed in TiApp.xml is not carried over to the android:icon section of AndroidManifest.xml.
Based on the [doc](http://docs.appcelerator.com/titanium/3.0/#!/guide/Icons_and_Splash_Screens-section-29004897_IconsandSplashScreens-Icons%2Csplashscreens%2Candstorerequirements), the density-specific Android icons should be put inside platform/res/drawable-
Ping, in your zip file, you still have appicon.png *also* listed under the Resources/android/ directory. See Jon Barnhart's comment above about Titanium requiring it. Under what circumstances does that copy of the icon get used?
Shawn, I deleted the /Resources/android/image/appicon.png file and the attached project still works fine. When we build the project, we will always check whether /platform/res/drawable/*appicon.png* exists or not. If it does not exist, we will try to copy /Resources/android/image/appicon.png to /platform/res/drawable/. In this situation, the /Resources/android/image/appicon.png is used.
Ping, thanks for clarifying. > When we build the project, we will always check > whether /platform/res/drawable/appicon.png exists or not. Does that go for any of the /platform/res/drawable-
{panel} I'm using Windows 7. I have appicon.png in these locations only: \platform\android\res\drawable-mdpi\appicon.png \platform\android\res\drawable-hdpi\appicon.png \platform\android\res\drawable-xhdpi\appicon.png So something is still wrong. I have to throw a copy of the appicon.png file into this location to get it to build: /Resources/android/appicon.png
Shawn, we only check for /platform/res/*drawable*/ directory. In your case, since you don't have /platform/res/drawable/appicon.png, we will try to copy it from /Resources/android/. And since there is no /Resources/android/appicon.png, it throws the error as you described.
OK, got it. I just tested and throwing the extra copy in /platform/res/drawable/ makes it happy. However, I still have two points: 1. That's still an extra copy of the icon that will never be used. 2. The only reason I have for the /platform/res/drawable-
Unable to reproduce this issue, tested with the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.2 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80