android-custom-icons

Use custom PNG icons in Android apps instead of library icons. Enforces placeholder usage, standard directory, and PROJECT_ICONS.md tracking. Applies to Jetpack Compose and XML layouts.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "android-custom-icons" with this command: npx skills add peterbamuhigire/skills-web-dev/peterbamuhigire-skills-web-dev-android-custom-icons

Required Plugins

Superpowers plugin: MUST be active for all work using this skill. Use throughout the entire build pipeline — design decisions, code generation, debugging, quality checks, and any task where it offers enhanced capabilities. If superpowers provides a better way to accomplish something, prefer it over the default approach.

Android Custom PNG Icons

Use custom PNG icons in Android apps instead of icon libraries. Whenever UI code includes an icon, the agent must use a PNG placeholder and update PROJECT_ICONS.md so the icon list is tracked for later upload.

Scope

Use for: All Android UI generation (Compose and XML).

Do not use: Material Icons, Font Awesome, or any bundled icon libraries unless the user explicitly asks for them.

Standard Icon Directory

  • Primary location: app/src/main/res/drawable/
  • If you need 1:1 pixels (no scaling): app/src/main/res/drawable-nodpi/

If multiple densities are provided later, place them in drawable-hdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi using the same file name.

File Naming Rules (Required)

  • Lowercase letters, numbers, underscores only
  • No hyphens, no spaces, no uppercase
  • File name becomes R.drawable.<name>

Examples:

  • cancel.png -> R.drawable.cancel
  • chart.png -> R.drawable.chart
  • filter.png -> R.drawable.filter

Compose Usage (Required)

Icon(
    painter = painterResource(R.drawable.cancel),
    contentDescription = "Cancel",
    modifier = Modifier.size(24.dp)
)
Image(
    painter = painterResource(R.drawable.chart),
    contentDescription = null,
    modifier = Modifier.size(48.dp)
)

XML Usage (Required)

<ImageView
    android:layout_width="24dp"
    android:layout_height="24dp"
    android:src="@drawable/cancel"
    android:contentDescription="@string/cancel" />

PROJECT_ICONS.md (Required)

Maintain a PROJECT_ICONS.md file at the project root. Every time code introduces a new icon placeholder, append a row.

Template

# Project Icons

Standard path: app/src/main/res/drawable/

| Icon File  | Usage        | Screen/Component  | Status      | Notes            |
| ---------- | ------------ | ----------------- | ----------- | ---------------- |
| cancel.png | Close action | EditProfileTopBar | placeholder | Provide 24dp PNG |

Update Rules

  • Add a row every time a new icon placeholder is referenced in code.
  • Use the exact file name used in code (e.g., cancel.png).
  • Keep status as placeholder until the PNG is provided.

Mandatory Checklist (Per UI Generation)

  • Use PNG placeholders only (no icon libraries)
  • Use painterResource(R.drawable.<name>) or @drawable/<name>
  • Add or update PROJECT_ICONS.md
  • Placeholders use valid Android resource naming

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

google-play-store-review

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

jetpack-compose-ui

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

api-error-handling

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

android-development

No summary provided by upstream source.

Repository SourceNeeds Review