Android Question How to set custom font for a whole application in Android?

Abdou1283

Member
Licensed User
Longtime User
Hi, i need to change the font of my application (menus, toastmessage, actionbar, webview, labels ...) with a custom font, is it possible or not in b4a?? and how can i do it if it is possible?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is not so simple to change it everywhere but it is possible with some work.

Change the typeface of all views that are subclasses of labels (Label, Button, EditText, CheckBox and RadioButton):

B4X:
For Each v As View In Activity.GetAllViewsRecursive
 If v Is Label Then
  Dim lbl As Label = v
  lbl.Typeface = YourTypeface
 End If
Next

You can change the font of menus and toast messages with CSBuilder.
 
Upvote 0
Top