div-focus

Поведение элемента при фокусировке или потере фокуса.

Параметры

Параметры Описание
background

array

Фон элемента, когда он в фокусе. Может содержать несколько слоев.

Список возможных значений:

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

    object

    Рамка элемента, когда он в фокусе.

    Значение имеет тип div-border.

    next_focus_ids

    object

    Идентификаторы элементов, которые следующими получат фокус.

    Значение имеет тип next_focus_ids.

    Доступные платформы: Android, iOS.

    on_blur

    array

    Действия, когда элемент теряет фокус.

    on_focus

    array

    Действия, когда элемент получает фокус.

    next_focus_ids

    Параметры Описание
    down

    string

    Доступные платформы: Android, iOS.

    forward

    string

    Доступные платформы: Android, iOS.

    left

    string

    Доступные платформы: Android, iOS.

    right

    string

    Доступные платформы: Android, iOS.

    up

    string

    Доступные платформы: 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"
        },
        ...
      ]
    }
    
    Предыдущая
    Следующая