Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Apache Flex 4.11.0
Description
Steps to reproduce:
- Create a TabbedViewNavigatorApplication with applicationDPI set to 160 dpi
- Add a couple of ViewNavigator that have a MultiDPIBitmapSource as icon, and add icons for another resolution, e.g. 320 dpi
- Run on a device with that higher resolution
- Result: higher resolution icons will be loaded and displayed in the proper scale
- Stop the application and reload it
- Result: higher resolution icons will be loaded but not scaled properly, so they appear too large and with low resolution
Root cause: ViewNavigatorBase discards the MultiDPIBitmapSource information in saveViewData() and instead only saves the high resolution bitmap. After re-loading in ViewNavigatorBase.loadViewData(), only the bitmap is restored without the DPI information. Hence, BitmapImage etc. don't have sufficient information to properly scale the image, see BitmapImage.measure()