I have a simple card game in which the user can drag and drop cards around the screen. On some of the 2.2 Android phones, such as Droid and EVO, the map drawing is very slow. This is strange because it happens on some faster phones. However, these are not all the phones that I am testing on Droid and Droid X, and the program works fine and works on a slow phone such as G1. I started getting reports about it after Motorolla released update 2.2 for Droid.
Here is the fix I came up with, but it really reduces the quality of my graphics. Gradients look awful.
I changed this
Bitmap.createBitmap(newBmp.getWidth(), newBmp.getHeight(), Bitmap.Config.ARGB_8888);
to that
Bitmap.createBitmap(newBmp.getWidth(), newBmp.getHeight(), Bitmap.Config.ARGB_4444);
The problem goes away, but the look suffers. I need to save the alpha channel, so I can not use RGB_565. Is there a way to maintain image quality and not make it work so slowly?
android animation bitmap android-canvas
theJosh
source share