Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

WearArcLayout.LayoutParams

public static class WearArcLayout.LayoutParams
extends ViewGroup.MarginLayoutParams

java.lang.Object
   ↳ android.view.ViewGroup.LayoutParams
     ↳ android.view.ViewGroup.MarginLayoutParams
       ↳ androidx.wear.widget.WearArcLayout.LayoutParams


Layout parameters for a widget added to an arc. This allows each element to specify whether or not it should be rotated(around the center of the child) when drawn inside the arc. For example, when the child is put at the center-bottom of the arc, whether the parent layout is responsible to rotate it 180 degree to draw it upside down.

Note that the rotate parameter is ignored when drawing "Fullscreen" elements.

Summary

Constants

int VALIGN_CENTER

Align to the center of the parent WearArcLayout.

int VALIGN_INNER

Align to the inner edge of the parent WearArcLayout.

int VALIGN_OUTER

Align to the outer edge of the parent WearArcLayout.

Inherited constants

Inherited fields

Public constructors

LayoutParams(Context context, AttributeSet attrs)

Creates a new set of layout parameters.

LayoutParams(int width, int height)

Creates a new set of layout parameters with specified width and height

LayoutParams(ViewGroup.LayoutParams source)

Copy constructor

Public methods

boolean getRotate()

Gets whether the widget shall be rotated by the WearArcLayout container corresponding to its layout position angle

int getVerticalAlignment()

Gets how the widget is positioned vertically in the WearArcLayout.

void setRotate(boolean rotate)

Sets whether the widget shall be rotated by the WearArcLayout container corresponding to its layout position angle

void setVerticalAlignment(int verticalAlignment)

Sets how the widget is positioned vertically in the WearArcLayout.

Inherited methods

Constants

VALIGN_CENTER

public static final int VALIGN_CENTER

Align to the center of the parent WearArcLayout.

Constant Value: 1 (0x00000001)

VALIGN_INNER

public static final int VALIGN_INNER

Align to the inner edge of the parent WearArcLayout.

Constant Value: 2 (0x00000002)

VALIGN_OUTER

public static final int VALIGN_OUTER

Align to the outer edge of the parent WearArcLayout.

Constant Value: 0 (0x00000000)

Public constructors

LayoutParams

public LayoutParams (Context context, 
                AttributeSet attrs)

Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context.

Parameters
context Context: the application environment

attrs AttributeSet: the set of attributes from which to extract the layout parameters' values

LayoutParams

public LayoutParams (int width, 
                int height)

Creates a new set of layout parameters with specified width and height

Parameters
width int: the width, either WRAP_CONTENT, MATCH_PARENT or a fixed size in pixels

height int: the height, either WRAP_CONTENT, MATCH_PARENT or a fixed size in pixels

LayoutParams

public LayoutParams (ViewGroup.LayoutParams source)

Copy constructor

Parameters
source ViewGroup.LayoutParams

Public methods

getRotate

public boolean getRotate ()

Gets whether the widget shall be rotated by the WearArcLayout container corresponding to its layout position angle

Returns
boolean

getVerticalAlignment

public int getVerticalAlignment ()

Gets how the widget is positioned vertically in the WearArcLayout.

Returns
int

setRotate

public void setRotate (boolean rotate)

Sets whether the widget shall be rotated by the WearArcLayout container corresponding to its layout position angle

Parameters
rotate boolean

setVerticalAlignment

public void setVerticalAlignment (int verticalAlignment)

Sets how the widget is positioned vertically in the WearArcLayout.

Parameters
verticalAlignment int: align the widget to outer, inner edges or center.