Sreejith Sree
Sreejith Sree

Reputation: 3671

Icons have poor clarity in Xamarin forms IOS project

I am using 24x24 pixels icons in my xamarin forms ios project, but not getting good clarity. So I modified all the icons with 32x32 pixel size. Icons sizes are increased but still getting poor clarity.

So which resolution icons are good for xamarin forms IOS project?

Upvotes: 0

Views: 227

Answers (1)

Markus Michel
Markus Michel

Reputation: 2299

For me it has proven to be good practise to add an image in three versions.

A "small" version, being used on non-retina devices, though that is kind of legacy support by now, a "medium" version for usual retina displays and a "large" one for higher ones.

If you name your files properly, xamarin.iOS will automatically choose the right file for the current device.

For instance, I have a file "fa_home.png" with a resolution of 25x25px, "[email protected]" in 50x50 and "[email protected]" in 75x75.

Just add the files to your project and reference the first one without the @2x or @3x addition in the name.

enter image description here

For Android , I am using the following sizes:

  • drawable - 72x72
  • drawable-hdpi - 72x72
  • drawable-xhdpi - 96x96
  • drawable-xxhdpi - 144x144

Upvotes: 2

Related Questions