Android Question Custom Styling a String

shashkiranr

Active Member
Licensed User
Longtime User
Hi All,

The awesome rich string lib allow to style a string only with basic fonts and not custom fonts. I came across a blog which used the below code to style a string using custom font. Is there any way it can be achieved in B4A ?

B4X:
SpannableString s = new SpannableString("My Title");
    s.setSpan(new TypefaceSpan(this, "MyTypeface.otf"), 0, s.length(),
            Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

Regards,
SK
 

shashkiranr

Active Member
Licensed User
Longtime User
No Erel. Just one but its not a font its in the action bar title. hence i need the SpannableString. Is there a way to achieve the above posted code in b4a ?
 
Upvote 0
Top