Loading repository data…
Loading repository data…
mikepenz / repository
Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
... allows to include any icon font with all its vector icons in your project. No limits. Scale with no limit, use any color at any time, provide a contour, and many additional customizations...
Already available fonts
dependencies {
//the core iconics library (without any widgets)
implementation "com.mikepenz:iconics-core:${latestAndroidIconicsRelease}"
implementation "androidx.appcompat:appcompat:${versions.appCompat}"
}
//this adds all ui view widgets (IconicsButton, IconicsImageView, ...)
implementation "com.mikepenz:iconics-views:${latestAndroidIconicsRelease}"
[!NOTE] Fonts ending with
-kotlinrequire at least v4.x of Android-Iconics v5.1.x or newer requires the latest font versions
implementation 'com.mikepenz:google-material-typeface:4.0.0.3-kotlin@aar'
implementation 'com.mikepenz:google-material-typeface-{outlined|rounded|sharp}:4.0.0.2-kotlin@aar'
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.9-kotlin@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.9.0.3-kotlin@aar'
implementation 'com.mikepenz:octicons-typeface:11.1.0.1-kotlin@aar'
implementation 'com.mikepenz:meteocons-typeface:1.1.0.8-kotlin@aar'
implementation 'com.mikepenz:community-material-typeface:7.0.96.1-kotlin@aar' // note 5.3.45.1 and newer alphabetically sorts, and merges in 3 sections
implementation 'com.mikepenz:weather-icons-typeface:2.0.10.8-kotlin@aar'
implementation 'com.mikepenz:typeicons-typeface:2.0.7.8-kotlin@aar'
implementation 'com.mikepenz:entypo-typeface:1.0.0.8-kotlin@aar'
implementation 'com.mikepenz:devicon-typeface:2.0.0.8-kotlin@aar'
implementation 'com.mikepenz:foundation-icons-typeface:3.0.0.8-kotlin@aar'
implementation 'com.mikepenz:ionicons-typeface:2.0.1.8-kotlin@aar'
implementation 'com.mikepenz:pixeden-7-stroke-typeface:1.2.0.6-kotlin@aar'
implementation 'com.mikepenz:material-design-icons-dx-typeface:5.0.1.3-kotlin@aar'
implementation 'com.mikepenz:phosphor-typeface:1.0.0.1-kotlin@aar'
implementation 'com.mikepenz:simple-icons-typeface:17.0.0.3@aar'
[!NOTE] For users of the version catalog, it is not possible to add the type, however you can do so via the implementation definition.
implementation(libs.material.typeface) { artifact { type = "aar" } }
[!WARNING]
The fonts use thejetpack startuplibrary to automatically register themselves. Ifjetpack startupis disabled, it is required to manually register the fonts. Please find additional details in the Register fonts.
[!NOTE]
It might be required to callIconics.init(applicationContext)if no context based APIs are used from the library otherwise.
IconicsDrawable(this, FontAwesome.Icon.faw_android).apply {
colorInt = Color.RED
sizeDp = 24
}
If you use the Iconics library via XML provide the icon you want to use in the following syntax: gmd-favorite --> fontId-iconName. A list of the
available fonts and their fontId can be found here.
All icon names from the default fonts can be found via the DEMO application.
Use the { icon-definer } syntax
Some great text with a {faw-android} font awesome icon and {met-wind} meteocons icons.
Specify the drawable in your drawable folder.
<com.mikepenz.iconics.IconicsDrawable
xmlns:app="http://schemas.android.com/apk/res-auto"
app:ico_icon="gmd_favorite"
app:ico_color="#0000FF"
app:ico_contour_width="1dp"
app:ico_contour_color="#00FFFF"
app:ico_size="24dp" />
// all custom theming attributes supported
Use like any normal drawable in your application. This feature was suggested and initially provided by @dzamlo
<com.mikepenz.iconics.view.IconicsImageView
android:layout_width="72dp"
android:layout_height="72dp"
app:iiv_color="@android:color/holo_red_dark"
app:iiv_icon="gmd-favorite" /> // or @string/gmd_favorite with our generator
//app:iiv_size="12dp"
//app:iiv_padding="2dp"
//app:iiv_contour_color="#FF0000"
//app:iiv_contour_width="2dp"
//app:iiv_background_color="#FFFF00"
//app:iiv_corner_radius="2dp"
//app:iiv_background_contour_color="#FF0000"
//app:iiv_background_contour_width="1dp"
//app:iiv_shadow_radius="4dp"
//app:iiv_shadow_dx="1dp"
//app:iiv_shadow_dy="1dp"
//app:iiv_animations="spin|blink_alpha|blink_scale"
<com.mikepenz.iconics.view.IconicsTextView
android:text="abc{hif-test}defgh{faw-adjust}ijk{fon-test1}lmnopqrstuv{fon-test2}wxyz"
android:textColor="@android:color/black"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:textSize="16sp"/>
<com.mikepenz.iconics.view.IconicsButton
android:text="{faw-adjust} Button"
android:layout_width="120dp"
android:layout_height="60dp"/>
To include the experimental compose support in your project add the following dependency to your project (since v5.2.0)
implementation "com.mikepenz:iconics-compose:${latestAndroidIconicsRelease}"
Use the provided Image wrapper and set the icon.
Image(
GoogleMaterial.Icon.gmd_access_alarm,
colorFilter = ColorFilter.tint(MaterialTheme.colors.primary),
)
![]()
| Link | Prefix | Dependency |
|---|---|---|
| Google Material Design Icons ORIGINAL by Google | gmd,gmo,gmr,gms | implementation 'com.mikepenz:google-material-typeface{-outlined,rounded,sharp}:+@aar' |
| Material Design Iconic Font Google Material Iconic | gmi | implementation 'com.mikepenz:material-design-iconic-typeface:+@aar' |
| Fontawesome | faw | implementation 'com.mikepenz:fontawesome-typeface:+@aar' |
| FontawesomeBrand | fab | implementation 'com.mikepenz:fontawesome-typeface:+@aar' |
| FontawesomeRegular | far | implementation 'com.mikepenz:fontawesome-typeface:+@aar' |
| Meteocons | met | implementation 'com.mikepenz:meteocons-typeface:+@aar' |
| Octicons | oct | implementation 'com.mikepenz:octicons-typeface:+@aar' |
| Community Material | cmd | implementation 'com.mikepenz:community-material-typeface:+@aar' |
| Weather Icons | wic | implementation 'com.mikepenz:weather-icons-typeface:+@aar' |
| Typeicons | typ | implementation 'com.mikepenz:typeicons-typeface:+@aar' |
| Entypo | ent | implementation 'com.mikepenz:entypo-typeface:+@aar' |
| Devicon | dev | implementation 'com.mikepenz:devicon-typeface:+@aar' |
| Foundation Icons | fou | implementation 'com.mikepenz:foundation-icons-typeface:+@aar' |
| Ionicons | ion | implementation 'com.mikepenz:ionicons-typeface:+@aar' |
| Pixden7Stroke | pe7 | implementation 'com.mikepenz:pixeden-7-stroke-typeface:+@aar' |
| Material Design DX | cmf | implementation 'com.mikepenz:material-design-icons-dx-typeface:+@aar' |
| Phosphor Icons | pho | implementation 'com.mikepenz:phosphor-typeface |