interface ViewPropsAndroid {
    collapsable?: boolean;
    collapsableChildren?: boolean;
    focusable?: boolean;
    renderToHardwareTextureAndroid?: boolean;
    tabIndex?: 0 | -1;
}

Hierarchy (view full)

Properties

collapsable?: boolean

Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.

collapsableChildren?: boolean

Setting to false prevents direct children of the view from being removed from the native view hierarchy, similar to the effect of setting collapsable={false} on each child.

focusable?: boolean

Whether this View should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.

renderToHardwareTextureAndroid?: boolean

Whether this view should render itself (and all of its children) into a single hardware texture on the GPU.

On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.

tabIndex?: 0 | -1

Indicates whether this View should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex for more details.

Supports the following values:

  • 0 (View is focusable)
  • -1 (View is not focusable)