Deprecated linear-cross-gravity

WARNING

This API is deprecated.

Introduction

Set the position of the child element on the cross axis of the parent container in linear layout, is an style on the parent container. Similar to align-items in flexible box layout.

When using linear-layout-gravity, align-self, linear-cross-gravity, and align-items simultaneously in a linear layout, the priority decreases from the first to the last. A higher-priority style will override a lower-priority style.

Examples

Syntax

linear-cross-gravity: none;
linear-cross-gravity: start;
linear-cross-gravity: end;
linear-cross-gravity: center;
linear-cross-gravity: stretch;

Values

  • none

    Default value. When the size of the parent element cross axis size(such as the width when linear-direction: column) is fixed, and the size of the child element in this direction is auto, none will be equivalent to stretch. In other cases it is equivalent to start.

  • start

    Align the beginning of the parent element's cross axis.

  • end

    Align the end of the parent element's cross axis.

  • center

    Align the center of the parent element's cross axis.

  • stretch

    Fill the container's cross axis.

Formal definition

Initial valuenone
Applies tolinear containers
Inheritedno
Animatable

Formal syntax

linear-cross-gravity = none | start | end | center | stretch

Difference between web

  • 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.