ورودی اشاره گر در Compose
با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Compose انواع APIها را برای کمک به شناسایی حرکاتی که از تعاملات کاربر ایجاد می شوند ارائه می دهد. API ها طیف گسترده ای از موارد استفاده را پوشش می دهند:
برخی از آنها سطح بالایی دارند و برای پوشش دادن رایج ترین ژست ها طراحی شده اند. برای مثال، اصلاحکننده clickable
تشخیص آسان کلیک را امکانپذیر میکند و همچنین ویژگیهای دسترسی را فراهم میکند و نشانگرهای بصری را هنگام ضربه زدن (مانند موجها) نمایش میدهد.
همچنین آشکارسازهای اشاره ای کمتر مورد استفاده قرار می گیرند که انعطاف پذیری بیشتری را در سطح پایین تر ارائه می دهند، مانند PointerInputScope.detectTapGestures
یا PointerInputScope.detectDragGestures
، اما ویژگی های اضافی را شامل نمی شوند.
در صفحات زیر درباره ورودی اشاره گر بیشتر بدانید:
- درک حرکات توضیحی درباره مفاهیم اصلی ایفا می کند که در هنگام مدیریت ورودی اشاره گر نقش دارند.
- روی نشانگر تک، رویدادهای تک موقعیت، ضربه بزنید و فشار دهید .
- اسکرول نحوه پیادهسازی کانتینرهای اسکرول را توضیح میدهد و نگرانیهای مربوط به قابلیت همکاری را مدیریت میکند.
- کشیدن، تند کشیدن، و پرت کردن، انواع مختلف کشیدن یک اشاره گر را نشان می دهد.
- چند لمسی در موقعیت هایی که بیش از یک اشاره گر استفاده می شود، شیرجه می زند.
{% کلمه به کلمه %}
{% آخر کلمه %} برای شما توصیه می شود
{% کلمه به کلمه %} {% آخر کلمه %}
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Pointer input in Compose\n\nCompose provides a variety of APIs to help you detect gestures that are\ngenerated from user interactions. The APIs cover a wide range of use cases:\n\n- Some of them are **high-level** and designed to cover the most commonly used\n gestures. For example, the\n [`clickable`](/reference/kotlin/androidx/compose/foundation/package-summary#(androidx.compose.ui.Modifier).clickable(kotlin.Boolean,kotlin.String,androidx.compose.ui.semantics.Role,kotlin.Function0))\n modifier allows easy\n detection of a click, and it also provides accessibility features and\n displays visual indicators when tapped (such as ripples).\n\n- There are also less commonly used gesture detectors that offer more\n flexibility on a **lower level** , like\n [`PointerInputScope.detectTapGestures`](/reference/kotlin/androidx/compose/foundation/gestures/package-summary#(androidx.compose.ui.input.pointer.PointerInputScope).detectTapGestures(kotlin.Function1,kotlin.Function1,kotlin.coroutines.SuspendFunction2,kotlin.Function1)) or\n [`PointerInputScope.detectDragGestures`](/reference/kotlin/androidx/compose/foundation/gestures/package-summary#(androidx.compose.ui.input.pointer.PointerInputScope).detectDragGestures(kotlin.Function1,kotlin.Function0,kotlin.Function0,kotlin.Function2))\n but don't include the extra features.\n\nLearn more about pointer input on the following pages:\n\n- [Understand gestures](/develop/ui/compose/touch-input/pointer-input/understand-gestures) gives an explanation of the core concepts playing a role when handling pointer input.\n- [Tap and press](/develop/ui/compose/touch-input/pointer-input/tap-and-press) expands on single pointer, single position events.\n- [Scroll](/develop/ui/compose/touch-input/pointer-input/scroll) explains how to implement scrolling containers, and handles interoperability concerns.\n- [Drag, swipe, and fling](/develop/ui/compose/touch-input/pointer-input/drag-swipe-fling) shows different types of dragging of a single pointer.\n- [Multi-touch](/develop/ui/compose/touch-input/pointer-input/multi-touch) dives into situations where more than one pointer is used.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Enable user interactions](/develop/ui/compose/text/user-interactions)\n- [Semantics in Compose](/develop/ui/compose/semantics)\n- [Compose modifiers](/develop/ui/compose/modifiers)"]]