Android: Why not remove ununsed icon sizes?

Developers
sk750
2012-08-06
2013-05-29
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-08-06

    Hi,

    The idea is in the future to have icon sizes switchable at run-time rather than map generation time, see getIconPrefix() in Configuration. Partly that's based on map generation not being available, partly on the viewpoint that resources are usually not as scarce on Android devices as on J2ME devices, and it's not too bad to carry a bit of choice even if it's not needed.

    The acute reason for the commit was to make Osm2GpsMid work properly, as it was dropping the huge_* icons Android needs. For consideration of space questions, would have been good just to rename huge_* to icons and drop the others, but that would have required reworking of the runtime. And with current code, would make sense to drop other icons than huge.

    However, I haven't followed the scaling & caching code - might be that as we can scale icons at run-time, different size icons are not required to be in the apk to be able to show different size icons.

     
  • sk750
    sk750
    2012-08-06

    > However, I haven't followed the scaling & caching code - might be that as we can scale icons at run-time, different size icons are not required to be in the apk to be able to show different size icons.

    Well, the icon menu icons are not cached, but scaled everytime for the current screen size, either up or down from the included icon size. Therefore I don't expect anything other than huge icons to be necessary on Android.

    On the other hand reading from your crash reports mostly images/icons seem to have been involved so it might well be those image manupulation operations are quite memory intensive on Android and it might be a bit better with scaling from a lower resolution source image.