Images MultiDensityImageSource

Trying to understand what Fuse does (and what it doesn’t).

I’m now developing an app for both iOS and Android mobile phones.

Regarding MultiDensityImageSource:
Which image files do I have to include?

  • Only name.png, name@2x.png, name@4x.png give the densities 1, 2, 4. (like it is used in the docs and examples) and Fuse will care of the rest?

  • Or should I include all assets for iOS and Android, so also all the ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi

What’s the best practice for this?
Is there a Fuse example project that shows how to include assets (images) so it will work on both type of devices with different screens.

Hi WilfredR,

The MultiDensityImageSource allows you to put inside of it a list of FileImageSource tags, each of which has a Density property. These are used in UX markup and displayed within the app.

From the docs we read that the Density property is a float, so technically if you wish you can put 1, 2, 4, 7, 8 or even 256 in there, disregarding if screens of that density exist or not. Fuse will select and use the right FileImageSource depending on the device its running on.

As for the ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi question - all these would be needed in the case of application icon, which you specify in your .unoproj file, according to the unoproj docs.