public class

WearArcLayout.LayoutParams

extends ViewGroup.LayoutParams

 java.lang.Object

↳ViewGroup.LayoutParams

↳androidx.wear.widget.WearArcLayout.LayoutParams

Overview

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

Fields
public static final intVALIGN_CENTER

Align to the center of the parent WearArcLayout.

public static final intVALIGN_INNER

Align to the inner edge of the parent WearArcLayout.

public static final intVALIGN_OUTER

Align to the outer edge of the parent WearArcLayout.

Constructors
publicLayoutParams(Context context, AttributeSet attrs)

Creates a new set of layout parameters.

publicLayoutParams(ViewGroup.LayoutParams source)

Copy constructor

Methods
public booleangetRotate()

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

public intgetVerticalAlignment()

Gets how the widget is positioned vertically in the WearArcLayout.

public voidsetRotate(boolean rotate)

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

public voidsetVerticalAlignment(int verticalAlignment)

Sets how the widget is positioned vertically in the WearArcLayout.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int VALIGN_OUTER

Align to the outer edge of the parent WearArcLayout.

public static final int VALIGN_CENTER

Align to the center of the parent WearArcLayout.

public static final int VALIGN_INNER

Align to the inner edge of the parent WearArcLayout.

Constructors

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: the application environment
attrs: the set of attributes from which to extract the layout parameters' values

public LayoutParams(ViewGroup.LayoutParams source)

Copy constructor

Methods

public boolean getRotate()

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

public void setRotate(boolean rotate)

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

public int getVerticalAlignment()

Gets how the widget is positioned vertically in the WearArcLayout.

public void setVerticalAlignment(int verticalAlignment)

Sets how the widget is positioned vertically in the WearArcLayout.

Parameters:

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