Skip to main content
Slatico logo
Monorepo Release Notice (v0.1.0 · Workspace Monorepo Release): Packages are verified in the open-source Slatico monorepo CI pipeline and prepared for upcoming public registry publishing (npm, pub.dev, Maven Central, and Swift Package Index). Clone github.com/infitusofficial/slatico to consume packages via workspace or local path today.
com.infitus.slatico:slatico-android · v0.1.0

Android Native (Jetpack Compose & VectorDrawable XML)

com.infitus.slatico:slatico-android packages all 189 native Android VectorDrawable XML resources (27 families across all 7 styles) along with a Jetpack Compose SlaticoIcon composable supporting runtime Duotone and dual-color COLOR path customization.

1. Gradle Installation (build.gradle.kts)

build.gradle.kts
// Maven Central dependency:
dependencies {
    implementation("com.infitus.slatico:slatico-android:0.1.0")
}

// Or local monorepo composite build in settings.gradle.kts:
// includeBuild("../slatico/packages/android")

2. Jetpack Compose (SlaticoIcon & SlaticoIconTheme)

MainScreen.kt
import androidx.compose.foundation.layout.Row
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.infitus.slatico.SlaticoIcon
import com.infitus.slatico.SlaticoIconName
import com.infitus.slatico.SlaticoStyle

@Composable
fun HeaderActions() {
    Row {
        // 1. Monochrome icon (defaults to size = 24.dp, LocalContentColor.current)
        SlaticoIcon(
            name = SlaticoIconName.BELL,
            style = SlaticoStyle.REGULAR,
            size = 24.dp,
            color = Color(0xFF010520),
            contentDescription = "Notifications"
        )

        // 2. Duotone icon with custom primary color, secondaryColor & secondaryAlpha
        SlaticoIcon(
            name = SlaticoIconName.SHIELD_CHECK,
            style = SlaticoStyle.DUOTONE,
            size = 28.dp,
            color = Color(0xFF010520),
            secondaryColor = Color(0xFFFF6040),
            secondaryAlpha = 0.25f,
            contentDescription = "Security Verified"
        )

        // 3. Color icon with default brand palette (#FF6040 primary + #000000 secondary)
        SlaticoIcon(
            name = SlaticoIconName.WALLET,
            style = SlaticoStyle.COLOR,
            size = 28.dp,
            contentDescription = "Wallet"
        )

        // 4. Color icon with two custom colors (color + secondaryColor)
        SlaticoIcon(
            name = SlaticoIconName.BELL,
            style = SlaticoStyle.COLOR,
            size = 28.dp,
            color = Color(0xFFFF6040),
            secondaryColor = Color(0xFF010520),
            contentDescription = "Alerts"
        )
    }
}

3. Android XML Views (VectorDrawable)

Every icon is available as @drawable/slatico_<snake_name>_<style> (or programmatically via SlaticoDrawables.of(name, style)):

res/layout/header_toolbar.xml
<!-- 1. Monochrome VectorDrawable tinted via app:tint -->
<ImageView
    android:layout_width="24dp"
    android:layout_height="24dp"
    android:src="@drawable/slatico_bell_regular"
    android:contentDescription="@string/notifications"
    app:tint="#010520" />

<!-- 2. Duotone VectorDrawable (secondary layer preserves built-in 20% fillAlpha) -->
<ImageView
    android:layout_width="28dp"
    android:layout_height="28dp"
    android:src="@drawable/slatico_shield_check_duotone"
    android:contentDescription="@null"
    app:tint="#010520" />

<!-- 3. Color VectorDrawable (omit app:tint to preserve #FF6040 + #000000 fills) -->
<ImageView
    android:layout_width="28dp"
    android:layout_height="28dp"
    android:src="@drawable/slatico_wallet_color"
    android:contentDescription="@string/wallet" />

4. Complete Parameter Reference (SlaticoIcon)

ParameterTypeDefaultDescription
nameSlaticoIconNamerequiredUPPER_SNAKE_CASE enum (SlaticoIconName.BELL, SlaticoIconName.ARROW_UP_RIGHT).
modifierModifierModifierCompose modifier applied to the root icon container.
styleSlaticoStyleSlaticoStyle.REGULARVisual style (THIN, LIGHT, REGULAR, BOLD, FILL, DUOTONE, COLOR).
sizeDp24.dpWidth and height of the rendered icon.
colorColorColor.UnspecifiedPrimary color for monochrome/Duotone (falls back to LocalContentColor) or primary fill (0xFFFF6040) for COLOR.
secondaryColorColorColor.UnspecifiedSecondary layer color for DUOTONE and COLOR (default 0xFF000000).
secondaryAlphaFloat0.22fSecondary layer alpha (0f..1f) for DUOTONE icons.
contentDescriptionString?nullTalkBack accessibility description (null marks the icon decorative).