[][src]Module cursive::direction

Direction-related structures.

This module defines two main concepts: Orientation and Direction.

Orientation

Orientation is a simple enum that can take two values: Horizontal or Vertical.

Direction

Direction is a bit more complex, and can be of two kinds:

  • Absolute direction: left, up, right, or down

  • Relative direction: front or back. Its actual direction depends on the orientation.

    Usually, "front" refers to the "forward" direction, or the "next" element. For example, for a vertical LinearLayout, "front" would refer to the "down" direction.

    This is mostly relevant when referring to change of focus. Hitting the Tab key would usually cycle focus in the "front" direction, while using the arrow keys would use absolute directions instead.

Enums

Absolute

Absolute direction (up, down, left, right).

Direction

Represents a direction, either absolute or orientation-dependent.

Orientation

Describes a vertical or horizontal orientation for a view.

Relative

Direction relative to an orientation.