android - Java - Drawing bitmaps is laggy -


i drawing bitmaps screen using canvas , view. when open screen series of lags on positioning of image (almost if watching computer think place points).

first this:

enter image description here

then:

enter image description here

and finally:

enter image description here

i understand it's kind of hard description have given if has idea please tell me!

edit:

public class losescreen extends view {      @override protected void ondraw(canvas canvas) {      paint.setcolor(color.green);      canvas.drawbitmap(box, null, menubox, null);      menubox.set(screenwidth / 2 - menuwidth / 2, screenheight / 2 - menuheight / 2, menubox.left + menuwidth, menubox.top + menuheight);     tryagainbounds.set(screenwidth / 2 - tryagainwidth / 2, menuheight / 2, tryagainbounds.left + tryagainwidth, tryagainbounds.top + tryagainheight);       canvas.drawtext("    score:", 100 * density, menubox.top + 150 * density, finalscorepaint);     canvas.drawtext(finalscorestring, 225 * density, menubox.top + 150 * density, finalscorepaint);      canvas.drawtext("highscore:", 100 * density, menubox.top + 200 * density, finalscorepaint);     canvas.drawtext(highscore.tostring(), 225 * density, menubox.top + 200 * density, finalscorepaint);      canvas.drawbitmap(tryagain, null, tryagainbounds, null); 

hard know issue without seeing code. idea make sure using double buffering when drawing image screen (http://docs.oracle.com/javase/tutorial/extra/fullscreen/doublebuf.html)

basic description of does: draws image off screen whilst it's being "built" , move view when it's complete. won't speed drawing process.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -