Secara default, composable Icon diberi warna dengan LocalContentColor.current dan
berukuran 24.dp. Composable ini juga mengekspos parameter warna tint (yang memanfaatkan
mekanisme yang sama untuk menambahkan tint seperti yang dijelaskan di bagian Tint gambar). Composable
Icon ditujukan untuk digunakan pada elemen ikon kecil. Anda harus menggunakan
composable Image untuk opsi penyesuaian lainnya.
Direkomendasikan untuk Anda
Catatan: teks link ditampilkan saat JavaScript nonaktif
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-23 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-23 UTC."],[],[],null,["The `Icon` composable is a convenient way to draw a single color icon on screen\nthat follows [Material Design guidelines](https://material.io/design/iconography/system-icons.html#grid-and-keyline-shapes). To use `Icon`, include\nthe [Compose Material](/jetpack/androidx/releases/compose-material) library (or the [Compose Material 3](/jetpack/androidx/releases/compose-material3) library).\n\nFor example, if you had a vector drawable that you wanted to load up with\nMaterial defaults, you can use the `Icon` composable as follows:\n\n\n```kotlin\nIcon(\n painter = painterResource(R.drawable.baseline_directions_bus_24),\n contentDescription = stringResource(id = R.string.bus_content_description)\n)https://github.com/android/snippets/blob/5673ffc60b614daf028ee936227128eb8c4f9781/compose/snippets/src/main/java/com/example/compose/snippets/images/MaterialIconsSnippets.kt#L47-L50\n```\n\n\u003cbr /\u003e\n\nBy default, the `Icon` composable is tinted with `LocalContentColor.current` and\nis `24.dp` in size. It also exposes a `tint` color parameter (which leverages\nthe same mechanism for tinting as described in the [Image tint](/develop/ui/compose/graphics/images/customize#tint-image) section). The\n`Icon` composable is intended for use for small icon elements. You should use\nthe `Image` composable for more customization options.\n| **Note:** With Material there are two different styles of icons, Material Symbols (New) and Material Icons (`material-icons`). The [Material Icon library](/reference/kotlin/androidx/compose/material/icons/package-summary) includes a set of predefined `Icons` that can be used in Compose without needing to import an SVG manually. However, this artifact is no longer maintained or recommended for use in your apps, as it contains an older look and feel and can also increase the build time of your apps *significantly* . Instead, we recommend using [Google Font Icons](https://fonts.google.com/icons) and download the XML file from the Android Tab to create an up-to-date Material Symbols style Icon.\n\nRecommended for you\n\n- Note: link text is displayed when JavaScript is off\n- [Resources in Compose](/develop/ui/compose/resources)\n- [Accessibility in Compose](/develop/ui/compose/accessibility)\n- [Loading images {:#loading-images}](/develop/ui/compose/graphics/images/loading)"]]