GesturePointersUtilityStay organized with collectionsSave and categorize content based on your preferences.
Page Summary
TheGesturePointersUtilityclass manages pointer IDs to ensure each pointer is used in only one gesture at a time.
It provides methods for converting touch coordinates between pixels and inches (inchesToPixels,pixelsToInches).
You can check if a pointer ID is currently retained usingisPointerIdRetained.
ThemotionEventToPositionmethod converts a MotionEvent and pointer ID into a 3D position vector.
Pointer IDs can be retained and released usingretainPointerIdandreleasePointerId, respectively.
public classGesturePointersUtility
Retains/Releases pointer Ids so that each pointer can only be used in one gesture at a time.
Provides helper functions for converting touch coordinates between pixels and inches.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[],["`GesturePointersUtility` manages pointer IDs, ensuring each is used in only one gesture. It converts touch coordinates between pixels and inches using `pixelsToInches` and `inchesToPixels`. `retainPointerId` reserves a pointer ID, while `releasePointerId` frees it. `isPointerIdRetained` checks if an ID is in use. `motionEventToPosition` translates a MotionEvent and pointer ID into a Vector3 position. The constructor requires `DisplayMetrics`.\n"]]