التمرير سريعًا للعرض
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكنك السماح للمستخدمين بالتمرير السريع على أحد المكوّنات للكشف عن الإجراءات الإضافية.

يتيح لك المكوِّن التمرير سريعًا للعرض إمكانية إضافة إجراءات إضافية إلى
الشرائح والبطاقات، لا سيّما عند ظهورها في القوائم. يتيح هذا المكوِّن
للمستخدمين إنجاز المهام بسرعة بدون مغادرة الشاشة.
يمكن للمستخدمين تمرير الشرائح والبطاقات سريعًا إلى اليمين للوصول إلى هذه
الإجراءات، ثم النقر على إجراء لإكماله. يمكن للمستخدمين أيضًا تمرير الشرائح والبطاقات بالكامل إلى اليمين للانتقال بسرعة إلى الإجراء الأساسي.
يتضمن المكوِّن فتحتين لهذه الإجراءات:
- أساسي
- ثانوي (اختياري)
علم التشريح
الإجراءات التي تم الإفصاح عنها
ويمكن للمطوّرين تخصيص الإجراءات لحالات الاستخدام الفريدة لديهم. ننصحك باستخدام اللون والرموز التعبيرية في هذه الإجراءات لمساعدة المستخدمين على فهم معناها.
وتظهر الإجراءات التي تم الكشف عنها على الجانب نفسه لجميع اللغات.
- الإجراء الأساسي
- الإجراء الثانوي (اختياري)
الالتزام بإجراء أساسي
للالتزام بالإجراء الأساسي، يمكن للمستخدم إما النقر على الزر
أو مواصلة التمرير سريعًا إلى اليمين. بهذه الطريقة، يمتد الزرّ إلى عرض الشاشة بالكامل ويعرض تصنيفًا. يتلاشى الإجراء بعد
اختياره.
يعرض المثال الأول خيار زر واحد. ويعرِض المثال الثاني خيارًا باستخدام زرّ مزدوج.
التراجع عن الإجراء
بالنسبة إلى الإجراءات المدمرة، يمكنك إضافة مكوِّن تراجع للسماح للمستخدمين بالتراجع عن هذه
الإجراءات. أضِف إمكانية التراجع إلى الإجراء الأساسي.
في حال إضافة شريحة تراجع، سيظهر زر التراجع بدلاً من الإجراء الذي تم تنفيذه.
بعد فترة قصيرة، يتلاشى إجراء التراجع، ويكمل النظام الإجراء المطلوب.
حدود التمرير السريع
تعتمد التمريرة السريعة لكشف سلوك المكوِّن على مدى التمرير السريع للمستخدم على الشاشة:
- وفي حال تمرير المستخدم سريعًا على أقل من% 50 من الشاشة، يعود
المكوِّن إلى موضع البداية، ولا يتم اتخاذ أي إجراء.
- إذا مرّر المستخدم سريعًا على الشاشة بنسبة تتراوح بين 50% و75% من العرض الكامل، سيظل المكوّن مرئيًا جزئيًا، وستظهر الإجراءات المرتبطة بالمكوّن.
- إذا مرّر المستخدم سريعًا على أكثر من 75% من الشاشة، سيختفي المكوِّن وينفّذ النظام الإجراء الأساسي تلقائيًا.
تنفّذ المكونات التالية المستوحاة من المواد التعليمية التمرير السريع لكشف السلوك:
على البطاقات
تعرض لقطات الشاشة التالية التمرير السريع للكشف عن مظهر المكوِّن عند استخدام الفئة SwipeToRevealCard
:

على الرقائق
تعرض لقطات الشاشة التالية التمرير السريع للكشف عن مظهر المكوِّن عند استخدام الفئة SwipeToRevealChip
:

يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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:"]]