Using various ways to add images to an overflow menu. These overflow menu items always have text and and sometimes an image in front of the text.
The images can be provided by: an image file, FontAwesome or MaterialIcons icons, or by a high unicode icon character. This is the code covering the last
3 options:
Now these overflow icons may need to look disabled and that is easy with all, except the ones with images based on the unix icon characters (Case 0 above).
Is it possible to make these unix icon images disabled, so change the various colours to the same tint of gray?
Can't see an easy was to do this.
RBS
The images can be provided by: an image file, FontAwesome or MaterialIcons icons, or by a high unicode icon character. This is the code covering the last
3 options:
B4X:
If arrMenuButtons(i).iIconChar > 0 Then
Select Case arrMenuButtons(i).iIconFont
Case 0
btn.Typeface = Typeface.DEFAULT
btn.Text = UnicodeToString(arrMenuButtons(i).iIconChar, "UTF32") & " " & arrMenuButtons(i).strTitle1
btn.TextColor = arrMenuButtons(i).iTextColour
Case 1
Dim oCS As CSBuilder
oCS.Initialize.Typeface(Typeface.FONTAWESOME).Color(arrMenuButtons(i).iIconColour)
oCS.Append(Chr(arrMenuButtons(i).iIconChar)).PopAll
oCS.Typeface(Typeface.DEFAULT).Color(arrMenuButtons(i).iTextColour).Append(" " & arrMenuButtons(i).strTitle1).PopAll
btn.text = oCS
Case 2
Dim oCS As CSBuilder
oCS.Initialize.Typeface(Typeface.MATERIALICONS).Color(arrMenuButtons(i).iIconColour)
oCS.Append(Chr(arrMenuButtons(i).iIconChar)).PopAll
oCS.Typeface(Typeface.DEFAULT).Color(arrMenuButtons(i).iTextColour).Append(" " & arrMenuButtons(i).strTitle1).PopAll
btn.text = oCS
End Select
Now these overflow icons may need to look disabled and that is easy with all, except the ones with images based on the unix icon characters (Case 0 above).
Is it possible to make these unix icon images disabled, so change the various colours to the same tint of gray?
Can't see an easy was to do this.
RBS