Android-Iconics: Problems with new Community Material
I experience problems with the latest Community Material typeface (3.7.95.1-kotlin). I use the typesafe icons in my code, for example CommunityMaterial.Icon.cmd_fullscreen_exit.
The latest version now has 4 of such enums (Icon, Icon2, Icon3, Icon4), which makes individual icons really hard to discover. For example if I want the fullscreen icon, I would start to type Icon.fullscreen in my IDE and expect autocomplete to show me the available icons. This is now really tedious, because you need to try all 4 enums. I also had great personal pain just now, because I needed to update 100+ usage in my project, where the containing enum changed and I basically had to try all 4 variants 😕.
Another thing is this bug: getIcon only checks the first 2 enums and fails to find icons which are in the other two. I use cmd_filter_variant in my toolbar with the IconicsMenuInflaterUtil and that does not work anymore.
Can we revert this to at most two enums? Or if we really have to, use some categories as names at least?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (19 by maintainers)
Ok I was able to combine it into 2 sections again, and have it alphabetically sorted (also updated the web tool to ensure alphabetical sorting)
I think that should resolve the most direct concerns. we might also want to add a feature to the sample app which will tell you in which enum a icon is part of. to further simplify finding it
yep. absolutly. do it once lazily.
Fun fact the init would have to occur split into multiple functions. as 1 function can not have 4800 lines 😄
yeah will try that one again too. what is needed though in addition is to have all those mapped into a map with the field name. as we otherwise would need reflection to find the icon (which is slow)