div-focus

Element behavior when focusing or losing focus.

Parameters

Parameters Description
background

array

Background of an element when it is in focus. It can contain multiple layers.

List of possible values:

  • div-linear-gradient
  • div-radial-gradient
  • div-image-background
  • div-solid-background
  • div-nine-patch-background
  • border

    object

    Border of an element when it's in focus.

    The value has the type div-border.

    next_focus_ids

    object

    IDs of elements that will be next to get focus.

    The value has the type next_focus_ids.

    Available platforms: Android, iOS.

    on_blur

    array

    Actions when an element loses focus.

    on_focus

    array

    Actions when an element gets focus.

    next_focus_ids

    Parameters Description
    down

    string

    Available platforms: Android, iOS.

    forward

    string

    Available platforms: Android, iOS.

    left

    string

    Available platforms: Android, iOS.

    right

    string

    Available platforms: Android, iOS.

    up

    string

    Available platforms: Android, iOS.

    JSON
    {
      background: [ div-background, ... ],
      border: {
        corner_radius: "int",
        corners_radius: {
          bottom-left: "int",
          bottom-right: "int",
          top-left: "int",
          top-right: "int"
        },
        has_shadow: "bool_int",
        shadow: {
          alpha: "number",
          blur: "int",
          color: "string",
          offset*: {
            x*: {
              unit: "string",
              value*: "number"
            },
            y*: {
              unit: "string",
              value*: "number"
            }
          }
        },
        stroke: {
          color*: "string",
          unit: "string",
          width: "number"
        }
      },
      next_focus_ids: {
        down: "string",
        forward: "string",
        left: "string",
        right: "string",
        up: "string"
      },
      on_blur: [
        {
          download_callbacks: {
            on_fail_actions: [ div-action, ... ],
            on_success_actions: [ div-action, ... ]
          },
          is_enabled: "bool_int",
          log_id*: "string",
          log_url: "string",
          menu_items: [
            {
              action: div-action,
              actions: [ div-action, ... ],
              text*: "string"
            },
            ...
          ],
          payload: "object",
          referer: "string",
          target: "string",
          typed: div-action-typed,
          url: "string"
        },
        ...
      ],
      on_focus: [
        {
          download_callbacks: {
            on_fail_actions: [ div-action, ... ],
            on_success_actions: [ div-action, ... ]
          },
          is_enabled: "bool_int",
          log_id*: "string",
          log_url: "string",
          menu_items: [
            {
              action: div-action,
              actions: [ div-action, ... ],
              text*: "string"
            },
            ...
          ],
          payload: "object",
          referer: "string",
          target: "string",
          typed: div-action-typed,
          url: "string"
        },
        ...
      ]
    }