I have a DSTabLayout and I wanted to use the fontawesome font to add some kind of icons. Icons are not displayed, just the text.
(Dim VP As AHViewPager, Dim PC As AHPageContainer)
B4X:
PC.Initialize
Panel1.Initialize("")
Panel1.Color = Colors.White 'Colors.RGB(Rnd(0,256), Rnd(0,256), Rnd(0,256))
'PC.AddPage(Panel1, Chr(0xF080))
PC.AddPage(Panel1, Chr(0xF080) & " Chart")
Panel2.Initialize("")
Panel2.Color = Colors.White 'Colors.RGB(Rnd(0,256), Rnd(0,256), Rnd(0,256))
PC.AddPage(Panel2, Chr(0xF0F6) & " Raw Data")
'Set the PageContainer for the ViewPager
VP.PageContainer = PC
TabLayout.SetViewPager(VP)
TabLayout and VP has set typeface=fontawesome in the designer. I also added an invisible lblFontAwesome label, with fontawesome typeface, just in case (i think it was necessary in older versions?)
I know dstablaoyut supports the seticon method, but I thought using the font is easier.
I didn't knew such thing existed. I've read some topic with a question answered using something with cs and I tought it had something to do with c# haha.
However, I've looked for it, and I tried, but it doesn't work:
B4X:
PC.AddPage(Panel1, cs.Initialize.Append("Text with FontAwesome: ").Typeface(Typeface.FONTAWESOME).Append(Chr(0xF209)).PopAll)