[android-developers] How to get selected text from EditView and color it

2010-07-10 Thread monty
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

Re: [android-developers] How to get selected text from EditView and color it

2010-07-10 Thread YuviDroid
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 neilm30s...@gmail.com wrote: hey everyone Culd

Re: [android-developers] How to get selected text from EditView and color it

2010-07-10 Thread YuviDroid
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 yuvidr...@gmail.com wrote: Do