Android Question Is it possible to set MaterialIcons Typeface Bold in code?

Widget

Well-Known Member
Licensed User
Longtime User
If I have a MaterialIcons label defined with Style as Normal, is it possible to change it to Bold using code?

If I try something like this:
B4X:
lblTest.Typeface = lblNormal.Typeface                 'lblNormal is Using MaterialIcons Typeface
lblTest.TypeFace = Typeface.DEFAULT_BOLD        'This will reset lblTest.Typeface to DEFAULT

it will reset the Typeface from MaterialIcons back to Default typeface.

Why can't I say:
lblTest.Typeface = lblNormal.Typeface.Default_BOLD?​

The only way I can see to change lblTest.Typeface to Bold using code, is if I already have a separate dummy label that is defined with Typeface = MaterialIcons and is already set to Bold. I don't see any way to do it using code like I can with the Default typeface.

I have included a simple test app to demonstrate the problem.

TIA
 

Attachments

  • TestTypeFaceBold.Zip
    8.3 KB · Views: 274
Top