- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I want to add xxhdpi and xxxhdpi icons to Android app. I've added them into addition.xml:
<platform name="android"> <!-- ldpi : 36x36 px mdpi : 48x48 px hdpi : 72x72 px xhdpi : 96x96 px xxhdpi : 144x144 px xxxhdpi : 192x192 px--> <icon platform="android" src="package-assets/192x192.png" density="xxxhdpi" width="192" height="192"/> <icon platform="android" src="package-assets/144x144.png" density="xxhdpi" width="144" height="144"/> </platform>
Also I've tried to add the icons right to the root of the addition.xml:
<icon platform="android" src="package-assets/192x192.png" density="xxxhdpi" width="192" height="192"/> <icon platform="android" src="package-assets/144x144.png" density="xxhdpi" width="144" height="144"/>
In the both ways I don't see the icons in /res/ folder of the .apk.
How should I add icons to my app?
Thank you ind advance
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which CLI version are you specifying in your build? Did you try building both with and without "optimize for Crosswalk"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul!
I use CLI 5.4.1 with Crosswalk embedded 16, Minimum Android API 14, Target Android API 23
Olga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Olga -- I just did a build and the files are present in the "res" folder. Here's what I did to test:
- downloaded your project
- added a www/index.html file to the project
- removed references in <project-name>.xdk file to iOS certificates
- removed references in <project-name>.xdk file to splash screen images (not provided with your project)
- built the project with the build settings from your project (CLI 5.4.1, Crosswalk 16, etc.)
Here's a list of the icon files and their properties that were found inside the arm APK file:
~/Downloads/forum-703532.cordova.crosswalk.201611234015/arm/res$ find . -name icon.png ./drawable-hdpi-v4/icon.png ./drawable-ldpi-v4/icon.png ./drawable-mdpi-v4/icon.png ./drawable-xhdpi-v4/icon.png ./drawable-xxhdpi-v4/icon.png ./drawable-xxxhdpi-v4/icon.png ~/Downloads/forum-703532.cordova.crosswalk.201611234015/arm/res$ find . -name icon.png -exec file {} \; ./drawable-hdpi-v4/icon.png: PNG image data, 72 x 72, 8-bit colormap, non-interlaced ./drawable-ldpi-v4/icon.png: PNG image data, 36 x 36, 8-bit colormap, non-interlaced ./drawable-mdpi-v4/icon.png: PNG image data, 48 x 48, 8-bit colormap, non-interlaced ./drawable-xhdpi-v4/icon.png: PNG image data, 96 x 96, 8-bit colormap, non-interlaced ./drawable-xxhdpi-v4/icon.png: PNG image data, 144 x 144, 8-bit/color RGBA, non-interlaced ./drawable-xxxhdpi-v4/icon.png: PNG image data, 192 x 192, 8-bit/color RGBA, non-interlaced ~/Downloads/forum-703532.cordova.crosswalk.201611234015/arm/res$
Here's a screenshot of the contents of the arm APK file, expanded (it's a ZIP file in disguise):
Inspecting the x86 APK file I see the same as shown for the arm APK file.
And I've attached a copy of the icon.png image that was located in that "drawable-xxxhdpi-v4" folder, so you can inspect that icon.png image and confirm that it is the xxxhdpi image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only thing I can think of, that might be impacting your builds are:
- Are you using the latest version of the XDK? (3641)
- The splash screen images might be causing a problem.
The way the splash screen images were specified in the <project-name>.xdk file was very weird and looked to me like their would be a built failure. If you're not seeing a build failure, I don't know why, but I strong suspect they have something to do with the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Olga -- move the splash screen images to the package-assets folder, I think they have something to do with the problem.
Do this using the following process:
- copy the splash screen images into your package-assets folder
- "delete" them from your project using the "Launch Icons and Splash Screens" UI (hover over the image and push the trash can icon)
- close the XDK
- delete those images from your www folder
- reopen the XDK
- use the "Launch Icons and Splash Screens" UI to add them back into your project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's what I did but it didn't help :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please create a new project, using the blank cordova project template and copy your files from the old into the new. You'll have to reconfigure your build settings, add your plugins using the plugin manager, etc. by hand. Don't delete the old one, leave it there for reference to make sure you get all of your settings copied over.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
May be I have problem with my account? Because I've created new project from blank cordova template, added the icons, build the project and didn't get the high resolution icons in the build. Then I've removed Intel XDK completele from my computer, installed again and then created new Intel XDK project from blank Cordova template, added the icons, build the project and again get just 4 icons in the build.
The project and the build are attached (the extension of the build is canged to .zip)
Olga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've downloaded and installed Intel XDK on my new computer, created new Intel XDK account and build the project - I didn't get tje hight resolution icons. I've chenged the png files to another pictures with the same size - it didn't help. I'm trying to play with xml properties: <icon platform="android" src="package-assets/Sash-192.png" width="192" height="192"/> or <icon platform="android" src="package-assets/Sash-192.png" density="xxxhdpi"/> instead of <icon platform="android" src="package-assets/Sash-192.png" density="xxxhdpi" width="192" height="192"/>.
What do I miss?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a new blank project and copy your source files into that new project. Copy your icon and splash screen files into the package-assets folder (create the folder if it does not exist). Configure your build settings in the new project so they match the old project. I think there is something wrong with your <project-name>.xdk file, so do NOT copy the *.xdk or *.xdke files into your new project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page