Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33989

ViewNavigatorBase discards MultiDPIBitmapSource information for icon when saving and re-loading view data

    XMLWordPrintableJSON

Details

    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()

      Attachments

        Activity

          People

            jmclean Justin Mclean
            vincent.spallek@gmail.com Vincent Spallek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: