B4A Library 2046 MaterialIcons in the Color you need

corwin42

Expert
Licensed User
Longtime User
I just tried this library.

The MaterialDrawableBuilder is useless in the current implementation. The main method to set the Icon is missing. Would be even nice if the setAlpha() method will get wrapped.

Btw. the library was updated with many more new icons...
 

DonManfred

Expert
Licensed User
Longtime User
The main method to set the Icon is missing.
What do you mean exactly? It IS there. And it was there in the "old" implementation. But you cant set the icon with it´s name... You only can set the index of the icon you want to use. See example-code. That´s the way the github project exüect the icon to set.

If you know a easy way to change the enum used by the github project so be a setter with the name of the icon; show me how and i´ll do if not much work.

I´ve updated the lib to use the newest github release. Now 1712 Icons.

The #additionalres is no longer needed. Also not the fontfile in the assets (it is now inside the aar).
 

corwin42

Expert
Licensed User
Longtime User

I'm talking about the MaterialDrawableBuilder, not the MaterialIconView. The MaterialDrawableBuilder doesn't have the Icon property. You cannot set an Icon so the object is useless. I tried to use it but get the error that no icon was choosen.
 

jayel

Active Member
Licensed User
Longtime User
I get this error when compiling :
 

jayel

Active Member
Licensed User
Longtime User
hello,

How can I set the logodrawable with an icon from materialicons?

B4X:
    Dim mi As MaterialIconView
    mi.Initialize("MaterialIcon")
    mi.Icon = 153
    mi.Color = 0xFF045B32
    ActionBar1.LogoDrawable = mi  <---- ERROR
 

Scantech

Well-Known Member
Licensed User
Longtime User
My large project will not work with Materialcon 2.0 using B4A 8.80 and 9.00. Material Icon 1.5 works ok with B4A 8.80 but B4A 9.00 will not work. MaterialIcon 1.5 and 2.0 will not work with B4A 9.00

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…