android / android/android-test

Swipe actions use toolType MotionEvent.TOOL_TYPE_UNKNOWN instead of FINGER or allow specifying

Offen
#754 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
1.2k
Forks
342
Ø Merge
11 Std. 29 Min.
Gemergte PRs (30 T.)
2

Beschreibung

### Description

The various [`Swipe` actions](https://github.com/android/android-test/blob/461ca02299807020c0b317b1805eb709d3c25147/espresso/core/java/androidx/test/espresso/action/Swipe.java) don't allow specifying the `toolType`. They use the simple [`MotionEvents.obtain`](https://developer.android.com/reference/android/view/MotionEvent#obtain(long,%20long,%20int,%20float,%20float,%20int)) method instead of [the full one](https://developer.android.com/reference/android/view/MotionEvent#obtain(long,%20long,%20int,%20int,%20android.view.MotionEvent.PointerProperties[],%20android.view.MotionEvent.PointerCoords[],%20int,%20int,%20float,%20float,%20int,%20int,%20int,%20int)), which sets the toolType to `MotionEvent.TOOL_TYPE_UNKNOWN`.

Since API level 14, real MotionEvents have had the toolType set to `MotionEvent.TOOL_TYPE_FINGER` or `STYLUS` or `MOUSE`.

The Swipe API should default to `TOOL_TYPE_FINGER` and optionally allow specifying a toolType.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit espresso/core/java/androidx/test/espresso/action/Swipe.java und untersuche, wie seine Aktionen MotionEvents.obtain aufrufen. Die Arbeit ist abgeschlossen, wenn Swipe standardmäßig MotionEvent.TOOL_TYPE_FINGER verwendet und eine Option bietet, einen anderen Tool-Typ anzugeben, wobei das bestehende Swipe-Verhalten erhalten bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
mobile-dev
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.