Silk Mobile

Table of Contents (Homepage)

Offset

When using Swipe-Commands - There is a parameter of Offset (in pixels).
This parameter determine the distance where the action will begin from end of the screen.

As a visual aid, an arrow will be drawn on the reflection showing the swipe motion. It will start according the offset value and will point the opposite of the swipe direction.

Best Practice: Use P2CX, P2CY commands for offset value to avoid dependency on exact screen resolution.

Example

In the following screen, the swipe command with Offset=100 will not produce a swipe, because the keypad is covering half of the screen.

images/download/attachments/3309653/image933.gif

So in order to overcome this, we can set the Offset to be 500, and then the swipe will start at 500 pixels above the beginning of the screen:

images/download/attachments/3309653/image934.gif

For Drag-Commands - you are required to enter the distance (in pixels) from the point where you want to start the dragging to the point where the drag should end.

Notes
  • YOffset: + values drag down, - values drag up.

  • XOffset: + values drag right, - values drag left.