Android APIs
public static class

ItemAlignmentFacet.ItemAlignmentDef

extends Object
java.lang.Object
   ↳ android.support.v17.leanback.widget.ItemAlignmentFacet.ItemAlignmentDef

Class Overview

Definition of an alignment position under a view.

Summary

Public Constructors
ItemAlignmentFacet.ItemAlignmentDef()
Public Methods
final int getItemAlignmentFocusViewId()
Returns Id of which child view take focus for alignment.
final int getItemAlignmentOffset()
Gets number of pixels to offset.
final float getItemAlignmentOffsetPercent()
Gets the offset percent for item alignment in addition to offset.
final int getItemAlignmentViewId()
Gets Id of which child view to be aligned.
final boolean isItemAlignmentOffsetWithPadding()
When it is true: we include left/top padding for positive item offset, include right/bottom padding for negative item offset.
final void setItemAlignmentFocusViewId(int viewId)
Sets Id of which child view take focus for alignment.
final void setItemAlignmentOffset(int offset)
Sets number of pixels to offset.
final void setItemAlignmentOffsetPercent(float percent)
Sets the offset percent for item alignment in addition to offset.
final void setItemAlignmentOffsetWithPadding(boolean withPadding)
Sets whether to include left/top padding for positive item offset, include right/bottom padding for negative item offset.
final void setItemAlignmentViewId(int viewId)
Sets Id of which child view to be aligned.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ItemAlignmentFacet.ItemAlignmentDef ()

Public Methods

public final int getItemAlignmentFocusViewId ()

Returns Id of which child view take focus for alignment. When not set, it will use use same id of getItemAlignmentViewId()

public final int getItemAlignmentOffset ()

Gets number of pixels to offset. Can be negative for alignment from the high edge, or positive for alignment from the low edge.

public final float getItemAlignmentOffsetPercent ()

Gets the offset percent for item alignment in addition to offset. E.g., 40 means 40% of the width from the low edge. Use ITEM_ALIGN_OFFSET_PERCENT_DISABLED to disable.

public final int getItemAlignmentViewId ()

Gets Id of which child view to be aligned. View.NO_ID refers to root view and should be only used in first one. Extra ItemAlignmentDefs should provide view id to match currently focused view.

public final boolean isItemAlignmentOffsetWithPadding ()

When it is true: we include left/top padding for positive item offset, include right/bottom padding for negative item offset.

public final void setItemAlignmentFocusViewId (int viewId)

Sets Id of which child view take focus for alignment. When not set, it will use use same id of getItemAlignmentViewId()

public final void setItemAlignmentOffset (int offset)

Sets number of pixels to offset. Can be negative for alignment from the high edge, or positive for alignment from the low edge.

public final void setItemAlignmentOffsetPercent (float percent)

Sets the offset percent for item alignment in addition to offset. E.g., 40 means 40% of the width from the low edge. Use ITEM_ALIGN_OFFSET_PERCENT_DISABLED to disable.

public final void setItemAlignmentOffsetWithPadding (boolean withPadding)

Sets whether to include left/top padding for positive item offset, include right/bottom padding for negative item offset.

public final void setItemAlignmentViewId (int viewId)

Sets Id of which child view to be aligned. View.NO_ID refers to root view and should be only used in first one. Extra ItemAlignmentDefs should provide view id to match currently focused view.