Android tile based game
<p>I develop tile based game to draw i use function <code>canvas.drawBitmap()</code> in each frame function drawBitmap using 400+ times when i use scroll (Gestures) performance is pretty bad.</p>

<p>Can anyone give me advice how to increase performance to make smooth animation.</p>

<pre><code>public class DiamondIsometric implements Render{
    private int MapWidth;
    private int MapHeight;
    private Bitmap _surface;
    private Bitmap tempBitmap; 
    public DiamondIsometric(int MapWidth,int MapHeight,Bitmap _surface)
    {
        this.MapWidth=MapWidth;
        this.MapHeight=MapHeight;
        this._surface = _surface;
    }
    public MapObject[][] BuildMap()
    {
        int rx;
        int ry;
        MapObject[][] MapObjects = new MapObject[MapWidth][MapHeight];
        for(int x=0;x&lt;MapHeight;x++)
            for(int y=0;y&lt;MapWidth;y++)
            {
                rx=(x-y)*_surface.getWidth()/2;
                ry=(x+y)*_surface.getHeight()/2;
                MapObject temp = new MapObject(new Point(rx,ry),_surface);              
                MapObjects[x][y]=temp;              
            }
        return MapObjects;      
    }

    @Override
    public void Render(Canvas canvas) {     
    }
    @Override
    public void Render(Canvas canvas,MapObject[][] MapObjects)
    {
        Paint temp = new Paint();
        temp.setColor(Color.BLACK);
        canvas.drawPaint(temp);
        Bitmap toDraw = Bitmap.createBitmap(MapWidth*_surface.getWidth(), MapHeight*_surface.getHeight(), Config.RGB_565);
        int bitmapOffsetX,bitmapOffsetY;
        canvas.drawBitmap(this.Render2(canvas,MapObjects),0,0,null);

    }
    public Bitmap Render2(Canvas canvas, MapObject[][] MapObjects)
    {
        Paint temp = new Paint();
        temp.setColor(Color.BLACK); 
        tempBitmap = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Config.RGB_565);
        Canvas wideBMPCanvas = new Canvas(tempBitmap);
        int bitmapOffsetX,bitmapOffsetY;
        for(int i=0;i&lt;MapObjects.length;i++)
            for(int j=0;j&lt;MapObjects[i].length;j++)
            {
                bitmapOffsetX=(IsometricView.globalAnchor.x % MapObjects[i][j]._bitmap.getWidth());
                bitmapOffsetY=(IsometricView.globalAnchor.y % MapObjects[i][j]._bitmap.getHeight());
                wideBMPCanvas.drawBitmap(MapObjects[i][j]._bitmap,MapObjects[i][j].coords.x-IsometricView.globalAnchor.x ,MapObjects[i][j].coords.y-IsometricView.globalAnchor.y , null);

            }
        return tempBitmap;
    }

}
</code></pre>
