thank you, Chris. I want to put on some color/style of text for individual characters to be displayed. I am using EditText.append() method (as u suggested). But all characters go to buffer and after all processing ,whatever style/color is attached with last characters : all the characters in buffer are displayed on screen with that style/color. But i need different style/color for different characters. Could you please help me solve this problem?
On Feb 18, 7:39 pm, Chris Mawata <chris.maw...@gmail.com> wrote: > The way you have written it that is what should happen -- you have a > loop > and you keep replacing the text with the substring. Generally in Jave > setXXX methods will replace the current value of a property with the > new value. Since this looks > like homework check the docs for a method that will add to the > string you currently have. > > On Feb 18, 7:45 am, mohit verma <mohit89m...@gmail.com> wrote: > > > > > > > > > Hi guys, > > I am having a string containing some words. > > Now in a for loop , i traverse the string and according to some condition i > > set the color and try to display text in this way: > > > while(not reached string length) > > { > > > if(condition1) my_edittext.setColor(Color.RED); > > > else if(condition2) my_edittext.setColor(Color.BLUE); > > > and so on..... > > > } > > > my_edittext.setText(substring); > > > } > > > Guys, i want my edittext to be filled-up by this colorfull string on > > activity startup(I mean without any actions yet performed on UI). > > > When i do all this..... in some string test cases , last word of my string > > appears in edittext but in other cases ... no string at all. > > > Could someone please help me correct my way of implementation? > > > Thanks in advance > > > -- > > Mohit -- 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