How to fill paricular portion of text content with chosen color

by Archana » Wed, 25 Nov 2009 13:53:14 GMT


Sponsored Links
 Hi..
Thanks this link is really useful for me..But i am facing 1 problem
i tried in this way..

TextView text;

Spannable str = (Spannable) text.getText();

str.setSpan(new BackgroundColorSpan(0xFFFFFF00), 3, 12,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

its working fine.But i dont want to set start point and end point as
(3,12).I want to get the length when i click

mouse on particular position in text.

I used event.getx() and getY(),But this will return screen cursor
position only.How can i get length dyanmically ?






--



How to fill paricular portion of text content with chosen color

by Dexter's Brain » Fri, 27 Nov 2009 15:54:32 GMT


 Well, for a textview, you cannot fetch the characters on which the
mouse is residing. I would recommend to use an uun-editable EditText
and the ask the user to first select some text from the Edit Text.

Now, EditText have methods, to let you know what is the start of
selection , and the end of selection.

I guess, I am clear enough.

Thanks,
Dexter.

--


Sponsored Links


How to fill paricular portion of text content with chosen color

by skink » Fri, 27 Nov 2009 20:26:00 GMT


 


yes, you can

see docs about text layouts

pskink

--



Other Threads

1. disable scrolling touch events in ScrollView, just want to to scroll programmatically

Just wondering if there is an easier way to simply stop ScrollView
from being scrolled via touch inputs? I will programmatically get the
ScrollView to scroll to top or bottom.

As a last resort, I guess I will have to inherit from ScrollView and
capture all the ontouch events. But wondering if there is an easier
way before I take this approach?

Thanks.
--~--~---------~--~----~------------~-------~--~----~

2. Android on the OLPC XO1 - Settings screen not working

Hi

I am trying the latest Donut branch on the OLPC XO1.  I've got it at a
stage where it boots up into the GUI now.  While the screen flickers
horribly and will sometimes not update or leave artifacts during
transitions, it does come up.  The current problem I have is that if I
select settings, it shows up the settings.  Once I select the
"Wireless ..." or any option within settings, nothing happens.  The
screen stays the same, or in some cases, I go back to Home screen.
Anyone seen anything like this?  How do I debug something like this -
Any tips and suggestions are welcome...


Gani

If someone else is interested in trying this out in the current state,
a starter pack is at 
http://www.siricon.co.uk/Invention/index.php/Home/Technology/Android_on_OLPC_XO1
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. question about tabhost

4. Is there any alternative of ImageIO class in Android?

5. Is there any alternative of ImageIO class in Android?

6. How to find my apps麓 locati on

7. Will a notification still work if the device once shut down.