relative-id

Introduction

Used to set the number of sibling elements in the relative-layout. -1 and 0 are special values. -1 is the default value, indicating that the current element will not be considered as the alignment reference standard for sibling elements. Using 0 as an element ID is not allowed, as it will result in unexpected behavior.

Examples

Values

<number>

int only. the number of the current element. Default value is -1.

-1 and 0 are special values. -1 is the default value, indicating that the current element will not be considered as the alignment reference standard for sibling elements. Using 0 as an element ID is not allowed, as it will result in unexpected behavior.

Syntax

relative-id: 1;
relative-id: 2;

Formal definition

Initial value-1
Applies torelative items
Inheritedno
Animatable

Difference between web

  • There is no such style in web.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.