Loading...
Loading...
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.
npx skill4agent add peterbamuhigire/skills-web-dev android-custom-iconsPROJECT_ICONS.mdapp/src/main/res/drawable/app/src/main/res/drawable-nodpi/If multiple densities are provided later, place them in,drawable-hdpi,drawable-xhdpi,drawable-xxhdpiusing the same file name.drawable-xxxhdpi
R.drawable.<name>cancel.pngR.drawable.cancelchart.pngR.drawable.chartfilter.pngR.drawable.filterIcon(
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)
)<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/cancel"
android:contentDescription="@string/cancel" />PROJECT_ICONS.md# 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 |cancel.pngplaceholderpainterResource(R.drawable.<name>)@drawable/<name>PROJECT_ICONS.md