Why is drawing bitmaps so slow on some Android 2.2 phones?

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?

+6
android animation bitmap android-canvas
source share
1 answer

Perhaps these are a few large Bitmaps that you are trying to process. Take a look at this tutorial on Android. Effectively upload large bitmaps .

I think this can help your performance and make download bitmaps not block the main UI thread.

0
source share

All Articles