Not getting complete text while Animation on Canvas : Android, -


i want animated text in android should run left right on screen. eg. want text private static final string quote = "nobody uses java anymore. it's big heavyweight ball , chain.";

running right left using animation.

however, text gets truncated "nobody uses java anymore. it's" in portrait mode , "nobody uses java anymore. it's big heavyweight" in landscape mode.

this code have used

        paint paint = new paint();         paint.setcolor(color.blue);         private static final string quote =         "nobody uses java anymore. it's big heavyweight ball , chain.";          paint.settextsize(20);         paint.setantialias(true);         int len= quote.length();         canvas.scale(1,-1);         canvas.drawtext(quote, 0, len-1, 100, 60, paint);         canvas.drawtext(quote,0,100 , paint);         createanim(canvas);               private void createanim(canvas canvas) {          anim2= new translateanimation(500,-500,30,30);         anim2.setrepeatcount(animation.infinite);         anim2.setinterpolator(new acceleratedecelerateinterpolator());         anim2.setrepeatmode(animation.restart);         anim2.setduration(1000l);         startanimation(anim2);               } 

how text animations using android sdk?

please refer post text animations.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -