Android Tutorial Material Design Icons (Update B4A / B4J)

Most of us know the material icons / fontawesome.

https://www.b4x.com/android/forum/threads/b4x-materialicons-web-font-chooser.103985/#content

That link is some what outdated. So made a new easy guide.

1. Download the latest version of Material Icons(6000+ Icons) from "materialdesignicons.com"
2. unpack on local computer
3 Copy "materialdesignicons-webfont.ttf" to your %App%/Files folder.(u can also rename the file)
4 Add it To files and change typeface to "materialdesignicons-webfont.ttf"
5 Open in the unpacked files "preview.html" in a webbrowser
6 Click on the icon u want and it will automatic copy to clipboard and then just paste it in the TEXT Field.
7 Done

Have fun

howto.jpg preview.jpgtest.jpg
 

TILogistic

Expert
Licensed User
Longtime User
another on how to create and use custom font icons
spanish:

English
 

MarcoRome

Expert
Licensed User
Longtime User
6 Click on the icon u want and it will automatic copy to clipboard and then just paste it in the TEXT Field.
or if you want add with code you can:

B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")

    Label2.Text = $"${Chr32(0xF1868)} Secondo"$

    Dim cs As CSBuilder
    cs.Initialize.Color(Colors.Red).Append($"${Chr32(0xF1868)} Test"$).PopAll
    Label3.Text = cs
End Sub


Sub Chr32(code As Int) As String
    Dim bc As ByteConverter
    Dim c() As Byte = bc.IntsToBytes(Array As Int(code))
    Return BytesToString(c,0,4, "UTF32")
End Sub
 
Top