I'm making an app for Android and with the template I see a folder called Resources/Drawable/Icon.png
But if you create a native app with Eclipse you see that several sizes of icons can be configured for different screen sizes.
How can we do that in MonoDroid?
Thanks.
The Resource folder on Mono for Android is mimicking the one on Android. So in order to create resource for different sizes of screens, you just create the folders according to which sizes of icons you want to put in them.
Your folder structure could end up looking like this:
|- Resources
|- Drawable
Icon.png
|- Drawable-ldpi
Icon.png
|- Drawable-mdpi
Icon.png
|- Drawable-hdpi
Icon.png
|- Drawable-xhdpi
Icon.png
And have the Icon.png files in different sizes according to the folder densities. The same principle goes for layouts as well. You can read more about this in the Android documentation for supporting multiple screen sizes.
Related
Just like the title says, 1x images are useless in my project now.
Is there any easy way to delete all 1x images at once?
I'm using xcassets to manage my images.
Thanks.
How about to open your project's folder in Finder and find your xcassets folder. Open it and you will find all images and also will be able to remove all you no longer need.
I'm new to iOS development. I have created a simple iOS app where I have many buttons with images inside. Also cells of UITableView in my application contains images.
Up to now I have put all images for buttons and cells in the "Assets.xcassets" folder. The images can also be accessed if I locate all images in separate directory (let say "Images" folder).
Where is the correct place to locate images? As far as I know in "Assets.xcassets" app logo, tab bar icons can be located, but I don't know is it allowed to store all images in that folder.
You can store any resource you like in the Assets.xcassets folder. Simply drag and drop the images into the Assets.xcassets folder and use them. There is no limit to what type of asset you put in the Assets.xcassets catalog. Of course, you can add a new asset catalog. It can be found in File > New > File, scrolling down to Resource and then clicking Asset Catalog. It acts the same as Assets.xcassets and the usage is the same.
For example, if you put an image called foo in an asset catalog called Bar.xcassets, you can still use
UIImage("foo")
without specifying the name of your catalog.
In general you should use assets for all static images you have in an app. Assets were introduced for a better handling of images with different resolutions for different devices (like #2x, #3x for retina devices). When user installs the app not all versions of the same image are downloaded but only that one that fits the best user's device. So your app will take less space which is good. Also assets are more convenient if you have several versions with different resolutions for the same image.
If you want you can place images in several assets. To add a new asset go to File > New > File and choose Asset Catalog in Resource section.
I have been trying to change my apps icon, but i cannot seem to do it. I have been following this example: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/AddingLaunchImagestoanAssetCatalog.html
but no matter what i do, i cannot get the icon to change. whenever i add an image, it just gives me an error saying that it is the incorrect size, but when i change the size of the image xcode tells me a new size.
is there something that isn't in this example that i would be missing?
This is a good way, you should do something like this:
For example:
40pt - 120:120 for #3x, 80:80 for #2x , 40:40 for #1x
for artworks 512:512 for #1x and 1024:1024 for #2x
Be attentive with icon sizes, and everything will be ok :)
I personally like to use this site to make my app icons. Just upload a fairly large icon artwork and they will send you an email with all the configured sizes.
In the file, go into the iOS folder and look for a folder called AppIcon.appiconset. Copy that.
Go into your app's source folder and into your images.xcassets folder. Now paste in that copied folder and say replace.
Resize them manually and then add them there by drag and drop
example: Size = 1x * 29pt = 29x29
Here is a link to the section on images and icons in the Apples humane interface guidelines, it goes over the different sizes that you need. And don't forget to append the #2x and #3x to the name of your icons!
First you need to convert the image then drag it into assets -> AppIcon
visit this website for converting icon
https://makeappicon.com
After converting the icon on the website they will mail you all the converted icons on your mail id, then you need to select the image icon form the provided list according to the size.
I am working on some app icons and my understanding is that if the standard app icon is 57x57, then the retina display version of it is 114x114
But I am coming across some things that are named like this:
icon-114#2x.png
Is that a mistake? Or should that be there?
Thanks!
To add icons do this...
Put all your different icon images onto your desktop (or some folder that isn't part of the project).
Delete any icon images from your project.
Go to the project build summary page.
Drag each image to its respective slot.
Done.
You don't need to worry about names or anything. Xcode will rename them for you and copy them into your project.
I am trying to put my app on the market and am granted with this error everytime I try:
Ipad: icon.png: dimensions (57 x 57) don't meet the size requirements. The icon file must be 72x72 pixels in .png format.
I have seen the endless posts about about modifying the .plist and also Edit Project Settings -> Build -> uncheck Compress PNG Files( Icon.png file error in universal app ). I have done both of this. I have also went through apples guide for universal app Icons and followed that as well. However I noticed a difference in the .plist file I have and they have (http://developer.apple.com/library/ios/#qa/qa1686/_index.html). (Mine has a Primary Icon attribute ) Is there something I am missing or is the apple documentation our of date?
When I change the icon to 72x72 I then get the same error except it says the icon file must be 57x57. It seems like it's trying to use icon.png for both the iphone and ipad icon when It should be using icon-72.png for ipad and icon.png for iphone. Is this defined somewhere else?
First of all I'm not sure if this is a rule or if it's just common practice, but your icons should start with a capital "I". Second, your iPad icon should be 72x72 not 57x57 like the iPhone icon. And finally, you're missing your iPad retina icon "Icon-72#2x.png" 144x144px.
Full break down of icons.
Icon.png = 57x57 iPhone non retina
Icon#2x.png = 114x114 iPhone retina
Icon-72.png = 72x72 iPad non retina
Icon-72#2x.png = 144x144 iPad retina
If you make sure your icons are exactly as I've listed then you won't have any problems.
If you are still experiencing problems after making these changes then try deleting all icon images from the project, and deleting the icon keys from your .plist file.
Then re-add the images to the project by dragging them directly to their corresponding placeholder in the summary tab of Xcode's navigator.
Well, I agree with #NSPostWhenIdle, But as far as the Naming conventions he is right, if you are adding directly to the plist,
But when it is concerned with Xcode , from Xcode 4.2, when you open the target settings -> Summary
I hope that you are using Xcode later than 4.2
And when you mouse over the App Icons section, it will show the size of icons and right click there and add icons. Xcode itself fix the names for your icons according to the size of the icons which you are selecting like this
So, No matter of fighting with the naming conventions of iCons, and if you add like this, these icon names are fixed my Xcode itself and these icons are automatically added to the plist File as well.
I removed the icons from my project via the file system, renamed them as suggested by NSPostWhenIdle and sree charan. I then dragged and dropped them into the the app icon section and removed and readded the entries in the .plist via a text editor. However this still wasn't effecient enough, I thought that removing the files from the project in the file system would remove the references in the project, THIS IS NOT TRUE. I suggest to anyone that with icon problems after this to do what I previously stated and remove all icon references/files via the project and NOT the file system before re-adding.
Your icon.png is probably not exactly 57x57. in finder, right click on the icon.png, get info. If it still says 57x57, then I am not sure why its throwing that error.
I had a similar issue when my icon.png was 57x56 (which I had never checked until xcode whined).
IF these dont work, restart your Xcode and or Mac, make a clean build.
I just want to add (for others finding this question) that I recently ran into this error, but in my case it was complaining that 76x76 did not meet the requirement of 72x72, which didn't make any sense to me since our iPad app is iOS 7 only and therefore according to all official documentation only requires icons of size 76x76 and 152x152.
Icon dimensions (76 x 76) don't meet the size requirements. The icon file must be 72x72 pixels, in .png format.
Anyhow it turned out the person uploading the binary was using an older version of Application Loader (from Xcode 4.6) and this check was happening client-side before the upload even took place.
Submitting the same binary using the newer Application Loader from Xcode 5 had no problem!