Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Alloy AttributedString and Attribute

$
0
0

What is the syntax for listing Attributes and AttributedStrings?

I can only get it to work as titanium classic code.

<Label id="label">
    <AttributedString text="123456789" class="as">
    </AttributedString>
</Label>
and
".as": {
    text:"This is the text",
    attributes: [
        {
            type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,
            value:'#f00',
            range:[0,5]
        }
    ]
}
If I write the equivalent js code, it works.

It'd be really cool to use those &lt;Attribute&gt; tags in xml but I don't know what @attributes to use on those tags.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>