Migrate from core v3.x.x to 4.x.x
developWhen upgrading from version 3.x.x to 4.x.x, note the following breaking changes:
- Kotlin-First: The library is now Kotlin-first.
- Font Storage: Fonts are now stored using the default Android way (moved from common assets to font-specific resource assets).
- Iconics Initialization:
Contextis no longer required forIconicsas the application context is retrieved viaContentProvider. - Iconics.Builder:
Iconics.IconicsBuilderhas been renamed toIconics.Builder, and thectx(Context)method has been removed. - IconicsDrawable API:
- Methods like
*Res(int),*Px(int), and*Dp(int)have been replaced byIconicsSizeandIconicsColorclasses. - Constants
TOOLBAR_ICON_SIZEandTOOLBAR_ICON_PADDINGare now located inIconicsSize. - All getters now use property syntax.
- Producer-provided methods from Android-Iconics Kt are included in the class and may return nullable values (values are only set if not null).
- Methods like
- Utility Classes: All
utilsclasses and typeface libraries can no longer be instantiated.enableShadowSupport(View)has moved toIconicsUtils. - ITypeface: The
getTypeface(Context)method is replaced by therawTypefacefield. It automatically retrieves the raw font from a file via the providedfontRes. - Community Material Icons: If using icons via code, the enum has been split due to size limits:
CommunityMaterial.Icon: Icons starting withathroughg.CommunityMaterial.Icon2: Icons starting withhthroughz.