Comments (10)
I think it is because you do not register the Google material nor the fontawesome font. This is required now if you try to use a specific font addon via string or xml
from android-iconics.
Totally missed to add it as upgrade notes. Just mentioned it down in the how to use section
from android-iconics.
Oh I see it now, yep. Thanks.
from android-iconics.
@wKovacs64 will add it as upgrade notes ;). I have not yet found a solution that existing fonts register them on their own. do you have an idea how i could solve this?
from android-iconics.
@wKovacs64 the main difference in the new version is that i had split up the fonts and the core. so the core is only the classes without any font included (this was previously done because so the 2 fonts were automatically in), this now allows you to save on app size by creating your own icon font with just the icons you need. (i have done this for the MaterialDrawer v4.0.0 now ;). A MaterialDrawerFont with just 3 icons -> size 5kb ;) )
from android-iconics.
README updated with upgrade notes ;)
from android-iconics.
@mikepenz Great, thanks. Hopefully that helps anyone else who might run into this.
If iconics
(not core) includes the fonts, why can't you register them automatically or however you did prior to 1.5.x? I haven't looked at the code changes yet, maybe that isn't possible. I might take a look if I can find some time.
from android-iconics.
@wKovacs64 the registering happens in the Iconics
class which is now part of the core. Prior v1.5.x the Iconics
included the GoogleMaterial
, FontAwesome
fonts in it's constructor. So they were added automatically, and you only had to register additional fonts.
The registering is only required if you try to use the fonts via xml or programmatically via string (when you want to create the icon via the string name). I somehow have to find out the font class by the 3 char identifier --> "gmd" --> via the Iconics font map --> GoogleMaterial.class
I have not found yet that a class is automatically instantiated and it will register itself. (as far as i've found this is not possible), then i tried to have it via pre processor annotations, but this was not possible as this works only when i have only one module.
I do not want compile time annotations as those will lower the performance.
Perhaps i can go a similar approach as with the AboutLibraries, to define the fonts via xml in the resources, and i will then just try to instantiate the class via reflection and add it to the map of registered fonts. should be possible, but i would have hopped for a better solution for this problem :/
from android-iconics.
@mikepenz Hmm, I see your point. Although I would personally take a compile time hit from annotation processing before a runtime hit from reflection (not that it would be that much). I don't care how long it takes to build as much as I care how it performs once it's on the device.
Maybe if I get some free time I will take a closer look.
from android-iconics.
@wKovacs64 great ;)
from android-iconics.
Related Issues (20)
- Update playstore App HOT 1
- Some icons are incorrectly rendered with `IconicsTextView` + XML HOT 13
- Update Community Material to latest version HOT 7
- Using custom fonts, icons can be displayed in Java code, but not in XML HOT 7
- Shadows with Compose HOT 1
- Disabling AppStartup silently breaks the library HOT 3
- com.mikepenz.iconics.view.IconicsImageView won't show image HOT 2
- Update Phosphor icon set to latest version HOT 1
- Custom Font library import error: Expecting member declaration HOT 2
- Update Google Material icons HOT 11
- How to make icons take on highlighted color of MaterialDrawerItem in XML? HOT 3
- Upgrade from 3.x to 5.x HOT 2
- java.lang.ClassNotFoundException: Didn't find class "com.mikepenz.iconics.typeface.IconicsInitializer" HOT 4
- Wrong icon name: faw-android
- Compose equivalent of IconicsTextView HOT 1
- Can I get source code for the iconpack creator tool? HOT 4
- Interface IIcon is unstable. HOT 12
- faw_bluetooth is missing
- Compose Image is ignoring `size` modifier HOT 1
- Document how to use "aar" artifacts with version catalogs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-iconics.