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

Abdou1283

Member
Licensed 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

Administrator
Staff member
Licensed 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.
 
Top