İpuçları
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Yazma yöntemini deneyin
Jetpack Compose, Android için önerilen kullanıcı arayüzü araç setidir. Compose'da bileşen eklemeyi öğrenin.
İpucu, kullanıcılar bir görünüme uzun bastığında veya fareyle üzerine geldiğinde görünümün yakınında görünen küçük bir açıklayıcı mesajdır. Bu, uygulamanızda düzen içinde yer kazanmak için bir işlemi veya bilgiyi temsil etmek üzere simge kullanıldığında yararlıdır. Bu sayfada, Android 8.0 (API düzeyi 26) ve sonraki sürümlerde bu ipuçlarını nasıl ekleyeceğiniz açıklanmaktadır.
Üretkenlik uygulamalarındaki gibi bazı senaryolarda fikir ve eylemlerin açıklayıcı bir yöntemle iletilmesi gerekir. Şekil 1'de gösterildiği gibi, açıklayıcı bir mesaj görüntülemek için ipuçlarını kullanabilirsiniz.

1.şekil Android uygulamasında görüntülenen ipucu.
Bazı standart widget'lar, title
veya content description
özelliklerinin içeriğine göre ipuçları gösterir. Android 8.0'dan itibaren, diğer özelliklerin değerinden bağımsız olarak ipucunda gösterilen metni belirtebilirsiniz.
İpucu metnini ayarlama
setTooltipText()
yöntemini çağırarak ipucu metnini View
içinde belirtebilirsiniz. İlgili XML özelliğini veya API'yi kullanarak tooltipText
özelliğini ayarlayabilirsiniz.
XML dosyalarınızda ipucu metnini belirtmek için aşağıdaki örnekte gösterildiği gibi android:tooltipText
özelliğini ayarlayın:
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:tooltipText="Send an email" />
Kodunuzdaki ipucu metnini belirtmek için aşağıdaki örnekte gösterildiği gibi setTooltipText(CharSequence)
yöntemini kullanın:
Kotlin
val fab: FloatingActionButton = findViewById(R.id.fab)
fab.tooltipText = "Send an email"
Java
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setTooltipText("Send an email");
API'de, tooltipText
özelliğinin değerini almak için kullanabileceğiniz bir getTooltipText()
yöntemi de bulunur.
Android, kullanıcılar fareyle görünümün üzerine geldiğinde veya görünüme uzun bastığında tooltipText
özelliğinin değerini gösterir.
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-26 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-26 UTC."],[],[],null,["Try the Compose way \nJetpack Compose is the recommended UI toolkit for Android. Learn how to add components in Compose. \n[Tooltip →](/develop/ui/compose/components/tooltip) \n\n\u003cbr /\u003e\n\nA tooltip is a small descriptive message that appears near a view when users\nlong press the view or hover their mouse over it. This is useful when your app\nuses an icon to represent an action or piece of information to save space in the\nlayout. This page shows you how to add these tooltips on Android 8.0 (API level\n26) and higher.\n\nSome scenarios, such as those in productivity apps, require a descriptive method\nof communicating ideas and actions. You can use tooltips to display a\ndescriptive message, as shown in figure 1.\n\n**Figure 1.** Tooltip displayed in an Android app.\n\nSome standard widgets display tooltips based on the content of the `title` or\n`content description` properties. Starting in Android 8.0, you can specify the\ntext displayed in the tooltip regardless of the value of other properties.\n\nSetting the tooltip text\n\nYou can specify the tooltip text in a [View](/reference/android/view/View) by calling the\n[setTooltipText()](/reference/android/view/View#setTooltipText(java.lang.CharSequence)) method. You can set\nthe `tooltipText` property using the corresponding XML attribute or API.\n\nTo specify the tooltip text in your XML files, set the [android:tooltipText](/reference/android/R.styleable#View_tooltipText) attribute, as shown\nin the following example: \n\n \u003candroid.support.design.widget.FloatingActionButton\n android:id=\"@+id/fab\"\n android:tooltipText=\"Send an email\" /\u003e\n\nTo specify the tooltip text in your code, use the [setTooltipText(CharSequence)](/reference/android/view/View#setTooltipText(java.lang.CharSequence)) method, as shown in the following example: \n\nKotlin \n\n```kotlin\nval fab: FloatingActionButton = findViewById(R.id.fab)\nfab.tooltipText = \"Send an email\"\n```\n\nJava \n\n```java\nFloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\nfab.setTooltipText(\"Send an email\");\n```\n\nThe API also includes a [getTooltipText()](/reference/android/view/View#getTooltipText()) method that\nyou can use to retrieve the value of the `tooltipText` property.\n\nAndroid displays the value of the `tooltipText` property when users hover their\nmouse over the view or long press the view."]]