Rendered style properties
Some properties are common to all primitives and to views with a rendering (called RenderedView
). Those properties will be described here but are applicable to all primitives in this section and also on rendered views (ie : RenderedView
, RenderedSharedView
).
Properties
opacity
scale
scaleX
scaleY
rotate
transformOriginX
transformOriginY
opacity
Type | Default value | Supported value |
---|---|---|
number | 1 | value between 0 and 1 inclusive |
Describes the opacity of the element :
- value 0 correspond to fully transparent (that is, invisible).
- Value 1 correspond to fully opaque (visually solid).
Caution
Android automatically clip container when you set an alpha different from 1. Be careful because it will prevent children that are going out of the container to be displayed properly.
scale
Type | Default value | Supported value |
---|---|---|
number | 1 | Not applicable |
Describes a value that will be used to resize the element on 2D context. Same value will be applied on both X and Y axis.
scaleX
Type | Default value | Supported value |
---|---|---|
number | null | Not applicable |
Describes a value that will be used to resize the element on 2D context only according X axis.
scaleY
Type | Default value | Supported value |
---|---|---|
number | null | Not applicable |
Describes a value that will be used to resize the element on 2D context only according Y axis.
rotate
Type | Default value | Supported value |
---|---|---|
number | 0 | Not applicable |
Describes in degrees the angle to rotate the element on 2D context around a fixed point.
transformOriginX
Type | Default value | Supported value |
---|---|---|
number | null | Not applicable |
Describes horizontal position (in pixels) from which all transformations (translation, rotation, scaling, …) will be applied.
If value is null
, it means center.
transformOriginY
Type | Default value | Supported value |
---|---|---|
number | null | Not applicable |
Describes vertical position (in pixels) from which all transformations (translation, rotation, scaling, …) will be applied.
If value is null
, it means center.