i think Mark is saying that you could redraw the score separately from the label, potentially saving an implicit new StringBuffer (stuff).toString () ?
if score is a number, then it will need to make a new String anyway. but you could cache the string of the score until the score changes, so that drawing the score becomes drawing to strings as opposed to going through StringBuffer. hth >It's a surface view so the whole scene must be rendered every frame. >I could put it on the background I suppose but it's simple enough to >just redraw the text. > >On May 25, 4:10 pm, Mark Murphy <mmur...@commonsware.com> wrote: >> Robert Green wrote: >> > I said StringBuffer but I meant "Implied" StringBuffer, you know: >> >> > canvas.drawText(score + POINTS_LABEL, x, y, paint); >> >> Why redraw POINTS_LABEL every time? Can't you rework your scoreboard to >> only draw that once? >> >> -- >> Mark Murphy (a Commons >>Guy)http://commonsware.com|http://twitter.com/commonsguy >> >> Android App Developer Training:http://commonsware.com/training.html > -- jason.software.particle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---