I've got a GridView
of many images which are retrieved from the assets folder and decoded from streams. These are t开发者_JS百科ypically quite large (to be used elsewhere in the app), but for the GridView need to only be 140dp wide or have a minimum height of 150dp. Which of the options in BitmapFactory.Options
should I use to scale the image to this density/resolution? I'm confused by the many different density options.
For fast retrieval, you should use inSampleSize. It automatically loads a smaller bitmap without first loading the full image into memory.
精彩评论