Android Question Is possible to change the typeface to a view?

D

Deleted member 30048

Guest
Hello, I want to create a routine that establishes a specific typeface to all elements automatically to avoid having to do it manually one to one. To do this, I thought to check each view and change it if is a label, button or edittext. The problem is that I can't set a typeface to a view. I want to use something like this:

B4X:
Sub Change_Font
    For Each V As View In Activity.GetAllViewsRecursive
        If V Is EditText OR V Is Button OR V Is Label Then
            'Here I want to use V.Typeface = Font
        End If
    Next
end sub

Is there any way to do something like this or should I change the typeface necessarily one to one?

Thanks!

Edit:

Solved! I found this thread where it says the solution

http://www.b4x.com/android/forum/threads/set-all-the-elements-to-a-typeface.28913/
 
Last edited by a moderator:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…