Ops, I just noticed now that you asked for 'text selection'...sorry! Still, you can use the getText() to get the entire text, and then use the String method: substring(int start, int end) to get only the selected text.
On Sat, Jul 10, 2010 at 10:55 AM, YuviDroid <[email protected]> wrote: > Do you mean EditText or TextView? > Anyway, in both cases to get the text: > > yourEditText.getText().toString(); > > to change the text color you can use: > yourEditText.setTextColor(Color.WHITE); > > > Hope it helps. > > > On Sat, Jul 10, 2010 at 8:32 AM, monty <[email protected]> wrote: > >> hey everyone >> Culd any1 please tell me how to get the selected text from a from >> EditView .I am using getStartSelection and getEndSelction method to >> get the start and end position.But after that how do i get the text >> and where do i store it and then change its color. >> >> Monty >> >> -- >> 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]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > > > > -- > YuviDroid > http://android.yuvalsharon.net > -- YuviDroid http://android.yuvalsharon.net -- 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

