I've never done this, but one idea is to redraw the word/line with a paint brush that alternates colors depending on the character.
Example, if you wanted "Hello World" and wanted the "W" to be red after 1 minute you might have to paint the line 3 times. Paint: "Hello " (default color) Paint: "W" (in red) Paint: "orld" (default color) -d- On Fri, Aug 21, 2009 at 9:01 AM, manoj <[email protected]> wrote: > > Hi friends, > > How can I know the length of the each character of word. > > Actually, I am trying some thing like this: > > I will show some set of lines on the screen. Later after some time, I > would like to set the color to each character in the line at a > frequent interval. > > Here I am drawing the txt on canvas c: > > p = new paint(); > p.setAlpha(0x30); > p.setXfermode(new PorterDuffXfermode > (PorterDuff.Mode.SRC)); > p.setTextSize(20); > p.setTextAlign(Paint.Align.LEFT); > c.drawText("some data",x,y,p); > > here c and p are Canvas and Paint respectively. > > Now I want to set the color to each and every character of the drawn > string. > > How can I achieve this. > > Please help me. > > Thanks, > Manoj. > > > > -- Donn http://blog.donnfelker.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

