يتم تلقائيًا تلوين العنصر القابل للإنشاء Icon باللون LocalContentColor.current، ويكون حجمه 24.dp. تعرض هذه السمة أيضًا مَعلمة tint color (التي تستخدم الآلية نفسها لتلوين الصور كما هو موضّح في قسم تلوين الصور). تم تصميم الدالة البرمجية القابلة للإنشاء
Icon لاستخدامها مع عناصر الرموز الصغيرة. يجب استخدام الدالة البرمجية القابلة للإنشاء Image للحصول على المزيد من خيارات التخصيص.
اقتراحات مخصصة لك
ملاحظة: يتم عرض نص الرابط عندما تكون JavaScript غير مفعّلة
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-08-23 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-23 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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)"]]