Where can I find all the name (e.g. style/...) and value (e.g. bold) pairs?
Regards, Jens On 29 Aug, 14:30, Teo <[email protected]> wrote: > That works great, thanks! Figuring other names and values as i go along (i > hope they don't change these in the future since they're pretty standard :) > > > > > > On Sat, Aug 29, 2009 at 12:18 AM, Peter LaBanca <[email protected]> wrote: > > > You can use Annotations to mimic StyledText enumerations. For example, > > the annotation name/value pair to make the text bold is: > > > Name: style/fontWeight > > Value: bold > > > Hope that helps > > Peter LaBanca > > > On Aug 28, 9:47 am, Teo <[email protected]> wrote: > > > Thanks for the tip, it works... Doesn't seem to work together with > > > StyledText though, but i must be doing something wrong, i'll figure it > > out. > > > Thanks again! > > > > On Fri, Aug 28, 2009 at 10:19 AM, Peter LaBanca <[email protected]> > > wrote: > > > > > You are correct. StyleType does not support colors as of yet. It only > > > > supports text transformation. However, you can change the color of the > > > > text in a TextView programmatically by changing the annotation of the > > > > text you would like with the TextView.setAnnotation(Range range, > > > > String name, String value) (Java syntax, not sure the Python syntax). > > > > You can omit the Range value to have the entire text have that > > > > annotation. The annotation name/value pair is as follows: > > > > > Name: style/color > > > > Value: rgb(###, ###, ###) > > > > > The #'s can be any 3 sets of numbers, each between 0 and 255. Here is > > > > a sample of my working code to edit the color annotation: > > > > > public void processEvents(RobotMessageBundle bundle) { > > > > // TODO Auto-generated method stub > > > > Wavelet wavelet = bundle.getWavelet(); > > > > for(Event e : bundle.getEvents()) > > > > { > > > > if(e.getType() == EventType.BLIP_SUBMITTED) > > > > { > > > > for(String word : syntax) > > > > { > > > > > if(e.getBlip().getDocument().getText().contains(word)) > > > > { > > > > Blip blip = e.getBlip(); > > > > TextView view = > > > > blip.getDocument(); > > > > view.setAnnotation(new > > > > Range0, 5), "style/color", "rgb(255, 255, > > > > 0)"); > > > > } > > > > } > > > > } > > > > } > > > > } > > > > > I hope that is what you were looking for. They will probably add more > > > > to the StyleType Enumeration to allow for colors. Until then, that is > > > > your solution. > > > > > Peter LaBanca > > > > > On Aug 27, 11:12 am, Teo <[email protected]> wrote: > > > > > Hi, > > > > > > can we color some text in a TextView? The StyleType class doesn't > > seem > > > > > to support this: > > > >http://wave-robot-java-client.googlecode.com/svn/trunk/doc/index.html > > > > > > Thanks, > > > > > Teo > > > > -- > > > Teo (a.k.a. Teominator a.k.a. Teodor Filimon) > > > sitewww.teodorfilimon.com|blogwww.teodorfilimon.blogspot.com > > > GMT +2 > > -- > Teo (a.k.a. Teominator a.k.a. Teodor Filimon) > sitewww.teodorfilimon.com| blogwww.teodorfilimon.blogspot.com > GMT +2 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Wave API" 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/google-wave-api?hl=en -~----------~----~----~----~------~----~------~--~---
