Material Icons font in Dynamic Labels

How can i set the font of a Dynamic Label to “MATERIAL ICONS”??

PLEASE HELP ME IT’S URGENT

Dynamic Label, Dynamic Font? - Feedback / IWant - Kodular Community
I think this will help you

You can use the dynamic components extension:

And use With Icon From Material Font block to set a material icon to your component or use the dynamic components SetProperty block to set the property FontTypeface with the value 7 (Material Icons)
See here an example with the button component ( first list view type ):

See also here

2 Likes

Ok, but why Kodular gives me this error? And why can i resolve it??

java.lang.ClassCastException: com.google.appinventor.components.runtime.util.KodularDynamicUtil$ComponentReturnHelper cannot be cast to com.google.appinventor.components.runtime.ComponentContainer

You are trying to use one of the Dynamic Components as a component (not the actual visible component), which one are you trying to use?

1 Like

I don’t know… is the error caused by Kodular’s Dynamic Components and Yusufcihan’s extension?
Here are the blocks, help me please

See here:

1 Like

Ok, so i have to re-create the code but using Yusufcihan’s extension right?

Yes :slightly_smiling_face:

Ok thanks :frowning:

1 Like

Don’t use Yusufcihan’s extension you can also do it with variables.
My
Blocks:Screenshot_2020_1227_200512

Testing Apk:
MaterialFontTest.apk (5.2 MB)

Testing Aia:
MaterialFontTest.aia (1.9 KB)

Can i also set “Outlined” or “Rounded” or “Filled” icon using blocks or i have to download the icons?

See here:

Same applies for other icon types, example:
https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Rounded

1 Like

Yeah, but when i insert the name of .ttf file in SetProperty block, it gives me an error

Can you show your blocks and the error?

Since you are using a custom font , so the property name should be FontTypeFaceImport.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.