I am developing an app that uses a custom view where a bitmap is set and can be moved and zoomed by the touch screen input.
The bitmap I use is scaled down to be the smallest size that is larger than the screen size.
The app works for all devices that I have tested with (about 10 different devices ranging from 2.2~2.3.6 with various screen dimensions), except with Galaxy Nexus.
On Galaxy Nexus when the bitmap is larger than the screen size and I try to move it the bitmap leaves traces and doesn’t draw what it’s supposed to.
I have conducted various tests and found out that:
-it has nothing to do with where the bitmap is drawn.
-it is always the right side and or the bottom side that always has the issue
-if I rotate the bitmap before drawing on the view and make it fit within the screen, it works fine.
-happens even when hardware acceleration is turned off.
So my best guess as of now is that somehow the bitmap is not loaded into the memory properly (only bitmaps within size of the screen will load properly). It seems to be an issue with android 4.0, but not sure as I only own 1 device that has android 4.0.
If anyone knows how to solve this problem, or knows what the problem is it will be great help. Thanks a lot in advance.
I solved the problem! It was the view’s size… I guess from android 4.0, you have to make sure the view is larger than the bitmap you wish to draw on it.