One particular activity uses a gallery view and many images that are displayed when one item in the gallery view is clicked. When you scroll through the gallery, the scrolling is very smooth ONLY if one certain image is commented out (even if 40+ images/textviews are displayed). We've tried changing the resolution of that image, changing the scaletype, but it still lags the gallery view. This image takes up a large portion of the background. Have you ever encountered any problems similar to this? We would really appreciate any advice you have to offer.
A:
Try loading the image with ImageIO. Then check the type of the BufferedImage it returns (BufferenImage.getType()
). Most likely it is not TYPE_INT_ARGB
or TYPE_INT_RGB
. (Probably TYPE_CUSTOM
.) When this is the case there is a conversion being performed on every paint.
Devon_C_Miller
2010-07-13 19:56:48