Zum Anzeigen wischen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Nutzer können über Wischen auf eine Komponente zusätzliche Aktionen aufrufen.

Mit der Komponente Wischen, um zu enthüllen können Sie Chips und Karten zusätzliche Aktionen hinzufügen, insbesondere wenn sie in Listen angezeigt werden. Mit dieser Komponente können Nutzer schnell Dinge erledigen, ohne den Bildschirm verlassen zu müssen.
Nutzer können Chips und Karten teilweise nach links wischen, um auf diese Aktionen zuzugreifen, und dann auf eine Aktion tippen, um sie auszuführen. Nutzer können Chips und Karten auch vollständig nach links wischen, um schnell die primäre Aktion auszuführen.
Die Komponente hat zwei Slots für diese Aktionen:
- Primär
- Sekundär (optional)
Anatomie
Offengelegte Aktionen
Entwickler können die Aktionen für ihre individuellen Anwendungsfälle anpassen. Überlegen Sie sich die Farbe und die Ikonografie, die für diese Aktionen verwendet wird, damit Nutzer ihre Bedeutung verstehen.
Die angezeigten Aktionen werden für alle Sprachversionen auf derselben Seite angezeigt.
- Primäre Aktion
- Sekundäre Aktion (optional)
Primäre Aktion festlegen
Um die primäre Aktion auszuführen, kann der Nutzer entweder auf die Schaltfläche tippen oder weiter nach links wischen. So erstreckt sich die Schaltfläche über die gesamte Breite des Bildschirms und ein Label wird angezeigt. Die Aktion wird nach der Auswahl ausgeblendet.
Das erste Beispiel zeigt eine Option mit einer einzelnen Schaltfläche. Das zweite Beispiel zeigt eine Option mit zwei Schaltflächen.
Aktion rückgängig machen
Fügen Sie für zerstörerische Aktionen eine Komponente zum Rückgängigmachen hinzu, damit Nutzer diese Aktionen rückgängig machen können. Fügen Sie der primären Aktion die Undo-Funktion hinzu.
Wenn Sie einen Chip hinzufügen, wird anstelle der ausgeführten Aktion eine Schaltfläche zum Rückgängigmachen angezeigt.
Nach kurzer Zeit wird die Undo-Aktion ausgeblendet und das System führt die ausgeführte Aktion aus.
Wischschwellenwerte
Das Verhalten der Komponente „Wischen, um zu enthüllen“ hängt davon ab, wie weit der Nutzer wischt:
- Wenn der Nutzer weniger als 50% des Bildschirms wischt, springt die Komponente zurück in ihre Ausgangsposition und es wird keine Aktion ausgeführt.
- Wenn der Nutzer zwischen 50% und 75% der gesamten Breite über den Bildschirm wischt, bleibt die Komponente teilweise sichtbar und die mit der Komponente verknüpften Aktionen werden angezeigt.
- Wenn der Nutzer über mehr als 75% des Bildschirms wischt, verschwindet die Komponente und das System führt automatisch die primäre Aktion aus.
Die folgenden Material Design-Komponenten implementieren das Verhalten „Wischen, um zu enthüllen“:
Auf Karten
Die folgenden Screenshots zeigen, wie die Komponente bei Verwendung der Klasse SwipeToRevealCard
durch Wischen angezeigt wird:

Auf Chips
Die folgenden Screenshots zeigen, wie die Komponente bei Verwendung der Klasse SwipeToRevealChip
durch Wischen angezeigt wird:

Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-07-27 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-27 (UTC)."],[],[],null,["# Swipe to reveal\n\nAllow users to swipe a component to reveal extra actions.\n\nThe *swipe to reveal* component lets you add extra actions to\nchips and cards, specifically when they appear in lists. This component lets\nusers quickly get things done without leaving the screen.\n\nUsers can partially swipe chips and cards to the left to access these\nactions, then tap on an action to complete it. Users can also fully swipe\nchips and cards to the left to quickly commit to the primary action. \nThe component has 2 slots for these actions:\n\n1. **Primary**\n2. **Secondary (optional)**\n\nAnatomy\n-------\n\n### Revealed actions\n\nDevelopers can customize the actions for their unique use cases. Consider\nthe color and iconography used in these actions to help users understand\nwhat they mean.\n\nThe revealed actions appear on the same side for all language\nlocales.\n\n1. **Primary action**\n2. **Secondary action (optional)** \n\n### Commit to a primary action\n\nTo commit to the primary action, a user can either tap on the button or\ncontinue swiping to the left. In this way, the button extends to the entire\nwidth of the screen and displays a label. The action fades away after being\nselected.\n\nThe first example shows a **single button option** . The\nsecond example shows a **double button option**. \n\n### Undo action\n\nFor destructive actions, add an undo component to let users reverse these\nactions. Add the undo capability to the primary action.\n\nIf added, an undo chip button appears in place of the committed action.\nAfter a short period of time, the undo action fades away, and the system\ncompletes the committed action. \n\n### Swipe thresholds\n\nThe swipe to reveal component's behavior depends upon how far the user\nswipes across the screen:\n\n- If the user swipes across less than 50% of the screen, the component snaps back to its starting position, and no action is taken.\n- If the user swipes across the screen between 50% and 75% of the full width, the component remains partially visible, and the actions associated with the component appear.\n- If the user swipes across more than 75% of the screen, the component disappears, and the system automatically performs the primary action.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nRelated components\n------------------\n\nThe following material-themed components implement the swipe to reveal behavior:\n\n- [`SwipeToRevealCard`](/reference/kotlin/androidx/wear/compose/material/package-summary#SwipeToRevealCard(androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.foundation.RevealState,androidx.compose.ui.Modifier,androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.material.SwipeToRevealActionColors,androidx.compose.ui.graphics.Shape,kotlin.Function0))\n- [`SwipeToRevealChip`](/reference/kotlin/androidx/wear/compose/material/package-summary#SwipeToRevealChip(androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.foundation.RevealState,androidx.compose.ui.Modifier,androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.material.SwipeToRevealAction,androidx.wear.compose.material.SwipeToRevealActionColors,androidx.compose.ui.graphics.Shape,kotlin.Function0))\n\n### On cards\n\nThe following screenshots show the swipe to reveal component's appearance when\nusing the `SwipeToRevealCard` class:\n\n### On chips\n\nThe following screenshots show the swipe to reveal component's appearance when\nusing the `SwipeToRevealChip` class:"]]