Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Ayırıcılar, listelerdeki veya diğer kapsayıcılardaki öğeleri ayıran ince çizgilerdir. HorizontalDivider ve VerticalDivider composable'larını kullanarak uygulamanızda ayırıcılar uygulayabilirsiniz.
Her iki bileşen de görünümlerini değiştirmek için parametreler sağlar:
thickness: Ayırıcı çizginin kalınlığını belirtmek için bu parametreyi kullanın.
color: Ayırıcı çizginin rengini belirtmek için bu parametreyi kullanın.
Yatay ayırıcı örneği
Aşağıdaki örnekte, HorizontalDivider bileşeninin bir uygulaması gösterilmektedir. Çizginin yüksekliğini kontrol etmek için thickness parametresini kullanır:
@ComposablefunHorizontalDividerExample(){Column(verticalArrangement=Arrangement.spacedBy(8.dp),){Text("First item in list")HorizontalDivider(thickness=2.dp)Text("Second item in list")}}
Bu uygulama, iki metin bileşeni arasında ince bir yatay çizgi oluşturur:
1. şekil. İki metin bileşenini ayıran yatay bir ayırıcı.
Dikey ayırıcı örneği
Aşağıdaki örnekte, VerticalDivider bileşeninin bir uygulaması gösterilmektedir. Çizgi için özel bir renk sağlamak üzere color parametresini kullanır:
@ComposablefunVerticalDividerExample(){Row(modifier=Modifier.fillMaxWidth().height(IntrinsicSize.Min),horizontalArrangement=Arrangement.SpaceEvenly){Text("First item in row")VerticalDivider(color=MaterialTheme.colorScheme.secondary)Text("Second item in row")}}
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-25 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-08-25 UTC."],[],[],null,["[Dividers](https://m3.material.io/components/divider/overview) are thin lines that separate items in lists or other\ncontainers. You can implement dividers in your app using the `HorizontalDivider`\nand `VerticalDivider` composables.\n\n- [`HorizontalDivider`](/reference/kotlin/androidx/compose/material3/package-summary#HorizontalDivider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)): Separate items in a column.\n- [`VerticalDivider`](/reference/kotlin/androidx/compose/material3/package-summary#VerticalDivider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)): Separate items in a row.\n\nAPI surface\n\nBoth components provide parameters for modifying their appearance:\n\n- `thickness`: Use this parameter to specify the thickness of the divider line.\n- `color`: Use this parameter to specify the color of the divider line.\n\n| **Note:** You can use the `modifier` parameter to control padding.\n\nHorizontal divider example\n\nThe following example demonstrates an implementation of the\n`HorizontalDivider` component. It uses the `thickness` parameter to control the\nheight of the line:\n\n\n```kotlin\n@Composable\nfun HorizontalDividerExample() {\n Column(\n verticalArrangement = Arrangement.spacedBy(8.dp),\n ) {\n Text(\"First item in list\")\n HorizontalDivider(thickness = 2.dp)\n Text(\"Second item in list\")\n }\n}https://github.com/android/snippets/blob/5673ffc60b614daf028ee936227128eb8c4f9781/compose/snippets/src/main/java/com/example/compose/snippets/components/Divider.kt#L57-L66\n```\n\n\u003cbr /\u003e\n\nThis implementation renders a thin horizontal line between two text components:\n**Figure 1.** A horizontal divider separating two text components.\n\nVertical divider example\n\nThe following example demonstrates an implementation of the\n`VerticalDivider` component. It uses the `color` parameter to provide a custom\ncolor for the line:\n\n\n```kotlin\n@Composable\nfun VerticalDividerExample() {\n Row(\n modifier = Modifier\n .fillMaxWidth()\n .height(IntrinsicSize.Min),\n horizontalArrangement = Arrangement.SpaceEvenly\n ) {\n Text(\"First item in row\")\n VerticalDivider(color = MaterialTheme.colorScheme.secondary)\n Text(\"Second item in row\")\n }\n}https://github.com/android/snippets/blob/5673ffc60b614daf028ee936227128eb8c4f9781/compose/snippets/src/main/java/com/example/compose/snippets/components/Divider.kt#L71-L83\n```\n\n\u003cbr /\u003e\n\nThis implementation renders a thin vertical line between two text components:\n**Figure 2.** A vertical divider separating two text components.\n\nAdditional resources\n\n- [`HorizontalDivider`](/reference/kotlin/androidx/compose/material3/package-summary#HorizontalDivider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color))\n- [`VerticalDivider`](/reference/kotlin/androidx/compose/material3/package-summary#VerticalDivider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color))\n- [Material Design - Dividers](https://m3.material.io/components/divider)"]]