Yahoo Search Búsqueda en la Web

Resultado de búsqueda

  1. 15 de abr. de 2024 · Track touch and pointer movements. This class describes how to write apps that allow users to interact with an app via touch gestures. Android provides a variety of APIs to help you create and detect gestures.

  2. 15 de abr. de 2024 · There are several ways to track movement in a gesture, depending on the needs of your application. The following are examples: The starting and ending position of a pointer, such as moving an on-screen object from point A to point B. The direction the pointer is traveling in, as determined by the X and Y coordinates. History.

  3. 22 de feb. de 2024 · Intercept touch events in a ViewGroup. Process ACTION_OUTSIDE events. Use ViewConfiguration constants. Extend a child view's touchable area. Handling touch events in a ViewGroup takes special care because it's common for a ViewGroup to have children that are targets for different touch events than the ViewGroup itself.

  4. 4 Answers. Sorted by: 76. You can use ACTION_UP: http://developer.android.com/reference/android/view/MotionEvent.html#ACTION_UP. View view = new View(); view.setOnTouchListener(new OnTouchListener () { public boolean onTouch(View view, MotionEvent event) { if (event.getAction() == android.view.MotionEvent.ACTION_DOWN) {

  5. 29 de jun. de 2010 · 5 Answers. Sorted by: 35. Try code below to detect touch events. mView.setOnTouchListener(new OnTouchListener() { @Override. public boolean onTouch(View v, MotionEvent event) { //show dialog here. return false; } }); To show dialog use Activity method showDialog (int). You have to implement onCreateDialog (). See documentation for details.

  6. 3 de may. de 2024 · Animate a scroll gesture. On this page. Understand scrolling terminology. Components that contain built-in scrolling implementations. Create a custom touch-based scrolling implementation. Implement the stretch overscroll effect. Catch the animation. Release the overscroll effect. Opt out of overscroll. Additional resources. Try the Compose way.

  7. developer.android.com › reference › androidTouch | Android Developers

    Modern Android. Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. Explore Modern Android. Adopt Compose for teams. Get started. Start by creating your first app. Go deeper with our training courses or explore app development on your own.