Changing Font-Family Property of a Label via Nativescript on Android -


i have following code js change font-family of label. idea access native api of android change font-family, seems not work. ideas problem ?

foo.xml:

<label text="foo" id="bloghead" textwrap="true"             cssclass="margin-20 verticalcenter" fontsize="24" /> 

foo.js:

var heading = view.getviewbyid(page, "bloghead"); heading.android.settypeface(android.graphics.typeface.create("courier new", android.graphics.typeface.normal)); 

courier new remapped font.

see here list of fonts , aliases built-in. understand difference might try following code (any valid font can used in place of sans-serif-light here):

var heading = view.getviewbyid(page, "bloghead"); heading.android.settypeface(android.graphics.typeface.create("sans-serif-light", android.graphics.typeface.normal)); 

Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -