Uygulamanızın, kullanıcının yanıt vermesini beklemeden kullanıcıya hızlı bir mesaj göstermesini isteyebileceğiniz durumlar vardır. Örneğin, bir kullanıcı e-posta gönderme veya dosya silme gibi bir işlem gerçekleştirdiğinde uygulamanız kullanıcıya hızlı bir onay gösterir. Genellikle kullanıcının mesaja yanıt vermesi gerekmez. Mesaj, kullanıcının görebileceği kadar belirgin olmalı ancak kullanıcının uygulamanızla çalışmasını engelleyecek kadar belirgin olmamalıdır.
Android, bu yaygın kullanım alanı için Snackbar
widget'ı sağlar. Snackbar, kullanıcıya hızlı bir pop-up mesajı gösterir. Snackbar gösterilirken mevcut etkinlik görünür ve etkileşimli kalır. Snackbar kısa bir süre sonra otomatik olarak kapanır.
Bu dokümanda, pop-up mesajları göstermek için Snackbar işlevinin nasıl kullanılacağı gösterilmektedir.
Şekil 1.Snackbar
etkinliğin alt kısmında bir mesaj gösterir ve etkinliğin geri kalanı kullanılabilir durumdadır.
Kullanıcının mesaja yanıt vermesine olanak tanıyacak şekilde mesaja nasıl işlem ekleyeceğinizi öğrenin.
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-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[],[],null,["# Pop-up messages overview\n\nTry the Compose way \nJetpack Compose is the recommended UI toolkit for Android. Learn how to add notifications in Compose. \n[Snackbar →](/develop/ui/compose/components/snackbar) \n\nThere are situations where you might want your app to show a quick message to the user, without\nnecessarily waiting for the user to respond. For example, when a user performs an action like\nsending an email or deleting a file, your app shows a quick confirmation to the user. Often, the\nuser doesn't need to respond to the message. The message needs to be prominent enough that the user\ncan see it, but not so prominent that it prevents the user from working with your app.\n\nAndroid provides the\n[Snackbar](/reference/com/google/android/material/snackbar/Snackbar)\nwidget for this common use case. A `Snackbar` provides a quick pop-up message to the\nuser. The current activity remains visible and interactive while the `Snackbar` is\ndisplayed. After a short time, the `Snackbar` automatically dismisses itself.\n\nThis documentation shows you how to use `Snackbar` to show pop-up messages. \n\n\n**Figure 1.** A `Snackbar`\nshows a message at the bottom of the\nactivity, and the rest of the activity is still usable.\n| **Note:** The `Snackbar` class supersedes [Toast](/reference/android/widget/Toast). While `Toast` is supported, `Snackbar` is the preferred way to display brief, transient messages to the user.\n\nAdditional resources\n--------------------\n\n\n**[Build and display a pop-up message](/develop/ui/views/notifications/snackbar/showing)**\n:\n Learn how to use a `Snackbar` to display\n a brief message to the user.\n\n\n**[Add an action to a message](/develop/ui/views/notifications/snackbar/action)**\n:\n Learn how to add an action to a message, letting the user respond to\n the message."]]