Breadcrumb

Overview

Adding touch support to your APEX apps help provide an improved and more natural mobile experience. This is especially important if your apps are more likely to be used on touch devices, such as smartphones or tablest. This page walks you through how you can use declarative touch events, introduced in APEX 18.1, to build touch friendly UIs.

Available Gestures

APEX 18.1 provides declarative support for the following touch gestures via Dynamic Actions:

  • tap and double tap
  • press
  • swipe
  • pan

Note: While APEX wraps these touch events to make them accessible via Dynamic Actions, the underlying touch support is powered using the hammer.js library.

Tap

Tap me!

Notable tap event data

  • this.data.tapCount number of times the screen was tapped
  • this.data.pointerType type of pointer (mouse or touch)

Note: tap events can also be triggered by clicking

Press

Press me!

Notable press event data

  • this.data.pointerType type of pointer (mouse or touch)

Note: press events can also be triggered by clicking and holding

Swipe

Swipe me!

Notable swipe event data

  • this.data.offsetDirection swipe direction (2 left, 4 right)
  • this.data.distance distance of the swipe gesture
  • this.data.pointerType type of pointer (mouse or touch)

Note: swipe events can also be triggered by clicking and quickly moving the cursor to the right or left

Pan

Pan me!

Notable pan event data

  • this.data.offsetDirection swipe direction (2 left, 4 right, 8 up, 16 down)
  • this.data.isFinal returns true if it is the last input
  • this.data.pointerType type of pointer (mouse or touch)

Note: pan events can also be triggered by clicking and dragging