Package icyllis.modernui.widget

# Class RelativeLayout

java.lang.Object
icyllis.modernui.view.View
icyllis.modernui.view.ViewGroup
icyllis.modernui.widget.RelativeLayout

All Implemented Interfaces:
  `Drawable.Callback`, `ViewManager`, `ViewParent`

Direct Known Subclasses:
  `RelativeRadioGroup`

public class RelativeLayout extends ViewGroup
A Layout where the positions of the children can be described in relation to each other or to the parent.

Note that you cannot have a circular dependency between the size of the RelativeLayout and the position of its children. For example, you cannot have a RelativeLayout whose height is set to `WRAP_CONTENT` and a child set to `ALIGN_PARENT_BOTTOM`.

Also see `RelativeLayout.LayoutParams` for layout attributes

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `RelativeLayout.LayoutParams`
  Specifies how a view is positioned within a `RelativeLayout`.

  ## Nested classes/interfaces inherited from class icyllis.modernui.view.ViewGroup

  `ViewGroup.MarginLayoutParams`

  ## Nested classes/interfaces inherited from class icyllis.modernui.view.View

  `View.DragShadow, View.Focusable, View.FocusableMode, View.FocusDirection, View.FocusRealDirection, View.LayoutDir, View.NestedScrollType, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnTouchListener, View.ResolvedLayoutDir, View.ScrollAxis, View.ScrollBarStyle, View.ScrollIndicators, View.TextAlignment, View.Visibility`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ABOVE`
  Rule that aligns a child's bottom edge with another child's top edge.
  `static final int`
  `ALIGN_BASELINE`
  Rule that aligns a child's baseline with another child's baseline.
  `static final int`
  `ALIGN_BOTTOM`
  Rule that aligns a child's bottom edge with another child's bottom edge.
  `static final int`
  `ALIGN_END`
  Rule that aligns a child's end edge with another child's end edge.
  `static final int`
  `ALIGN_LEFT`
  Rule that aligns a child's left edge with another child's left edge.
  `static final int`
  `ALIGN_PARENT_BOTTOM`
  Rule that aligns the child's bottom edge with its RelativeLayout parent's bottom edge.
  `static final int`
  `ALIGN_PARENT_END`
  Rule that aligns the child's end edge with its RelativeLayout parent's end edge.
  `static final int`
  `ALIGN_PARENT_LEFT`
  Rule that aligns the child's left edge with its RelativeLayout parent's left edge.
  `static final int`
  `ALIGN_PARENT_RIGHT`
  Rule that aligns the child's right edge with its RelativeLayout parent's right edge.
  `static final int`
  `ALIGN_PARENT_START`
  Rule that aligns the child's start edge with its RelativeLayout parent's start edge.
  `static final int`
  `ALIGN_PARENT_TOP`
  Rule that aligns the child's top edge with its RelativeLayout parent's top edge.
  `static final int`
  `ALIGN_RIGHT`
  Rule that aligns a child's right edge with another child's right edge.
  `static final int`
  `ALIGN_START`
  Rule that aligns a child's start edge with another child's start edge.
  `static final int`
  `ALIGN_TOP`
  Rule that aligns a child's top edge with another child's top edge.
  `static final int`
  `BELOW`
  Rule that aligns a child's top edge with another child's bottom edge.
  `static final int`
  `CENTER_HORIZONTAL`
  Rule that centers the child horizontally with respect to the bounds of its RelativeLayout parent.
  `static final int`
  `CENTER_IN_PARENT`
  Rule that centers the child with respect to the bounds of its RelativeLayout parent.
  `static final int`
  `CENTER_VERTICAL`
  Rule that centers the child vertically with respect to the bounds of its RelativeLayout parent.
  `static final int`
  `END_OF`
  Rule that aligns a child's start edge with another child's end edge.
  `static final int`
  `LEFT_OF`
  Rule that aligns a child's right edge with another child's left edge.
  `static final int`
  `RIGHT_OF`
  Rule that aligns a child's left edge with another child's right edge.
  `static final int`
  `START_OF`
  Rule that aligns a child's end edge with another child's start edge.
  `static final int`
  `TRUE`

  ### Fields inherited from class icyllis.modernui.view.ViewGroup

  `CLIP_TO_PADDING_MASK, FLAG_DISALLOW_INTERCEPT, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS`

  ### Fields inherited from class icyllis.modernui.view.View

  `ALPHA, BOTTOM, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, LAYOUT_DIRECTION_UNDEFINED, LEFT, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, mPaddingBottom, mPaddingLeft, mPaddingRight, mPaddingTop, mScrollX, mScrollY, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, RIGHT, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLL_X, SCROLL_Y, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TOP, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, TYPE_NON_TOUCH, TYPE_TOUCH, VIEW_MARKER, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RelativeLayout(Context context)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `checkLayoutParams(ViewGroup.LayoutParams p)`
  Check whether given params fit to this view group.
  `protected ViewGroup.LayoutParams`
  `generateDefaultLayoutParams()`
  Returns a set of default layout parameters.
  `protected ViewGroup.LayoutParams`
  `generateLayoutParams(ViewGroup.LayoutParams lp)`
  Returns a safe set of layout parameters based on the supplied layout params.
  `int`
  `getBaseline()`
  Return the offset of the widget's text baseline from the widget's top boundary.
  `int`
  `getGravity()`
  Describes how the child views are positioned.
  `int`
  `getIgnoreGravity()`
  Get the id of the View to be ignored by gravity
  `protected void`
  `onLayout(boolean changed, int left, int top, int right, int bottom)`
  Called from `View.layout(int, int, int, int)` when this view should assign a size and position to each of its children.
  `protected void`
  `onMeasure(int widthMeasureSpec, int heightMeasureSpec)`
  Measure the view and its content to determine the measured width and the measured height.
  `void`
  `requestLayout()`
  Call this when something has changed which has invalidated the layout of this view.
  `void`
  `setGravity(int gravity)`
  Describes how the child views are positioned.
  `void`
  `setHorizontalGravity(int horizontalGravity)`
  `void`
  `setIgnoreGravity(int viewId)`
  Defines which View is ignored when the gravity is applied.
  `void`
  `setVerticalGravity(int verticalGravity)`
  `boolean`
  `shouldDelayChildPressedState()`
  Return true if the pressed state should be delayed for children or descendants of this ViewGroup.

  ### Methods inherited from class icyllis.modernui.view.ViewGroup

  `addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addTransientView, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachViewToParent, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchTouchEvent, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewByPredicateTraversal, findViewTraversal, focusableViewAvailable, focusSearch, getChildAt, getChildCount, getChildDrawingOrder, getChildDrawingOrder, getChildMeasureSpec, getChildVisibleRect, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutTransition, getNestedScrollAxes, getTouchscreenBlocksFocus, getTransientView, getTransientViewCount, getTransientViewIndex, hasBooleanFlag, hasFocus, hasTransientState, indexOfChild, internalSetPadding, isChildrenDrawingOrderEnabled, isLayoutSuppressed, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, offsetChildrenTopAndBottom, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onChildVisibilityChanged, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onResolvePointerIcon, onSetLayoutParams, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeTransientView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestTransitionStart, resetResolvedDrawables, resolveDrawables, resolveLayoutDirection, resolveLayoutParams, resolvePadding, resolveRtlPropertiesIfNeeded, resolveTextAlignment, resolveTextDirection, restoreDefaultFocus, setAddStatesFromChildren, setBooleanFlag, setChildrenDrawingOrderEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutTransition, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, startActionModeForChild, startViewTransition, suppressLayout, transformPointToViewLocal, updateViewLayout`

  ### Methods inherited from class icyllis.modernui.view.View

  `addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, awakenScrollBars, awakenScrollBars, callOnClick, cancelLongPress, cancelPendingInputEvents, canReceivePointerEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerEvent, dp, draw, drawableHotspotChanged, findViewById, findViewByPredicate, findViewByPredicateInsideOut, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAlpha, getAnimationMatrix, getBackground, getBottom, getBoundsOnScreen, getBoundsOnScreen, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingRect, getElevation, getFadingEdge, getFadingEdgeLength, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getInverseMatrix, getKeyDispatcherState, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOnLongClickListener, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getPivotX, getPivotY, getRawLayoutDirection, getRawTextAlignment, getRawTextDirection, getRevealOnFocusHint, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTextAlignment, getTextDirection, getTooltipText, getTooltipView, getTop, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewRoot, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowVisibility, getX, getY, getZ, handleScrollBarDragging, hasExplicitFocusable, hasFocusable, hasIdentityMatrix, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasTranslationTransientState, hasWindowFocus, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForegroundInsidePadding, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInLayout, isInScrollingContainer, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionInherited, isLayoutDirectionResolved, isLayoutRequested, isLayoutRtl, isLongClickable, isNestedScrollingEnabled, isPaddingRelative, isPivotSet, isPressed, isRootNamespace, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentInherited, isTextAlignmentResolved, isTextDirectionInherited, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVerticalScrollBarHidden, keyboardNavigationClusterSearch, mapRectFromViewToScreenCoords, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCancelPendingInputEvents, onCreateContextMenu, onDetachedFromWindow, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyShortcut, onKeyUp, onOverScrolled, onResolveDrawables, onRtlPropertiesChanged, onScrollChanged, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowVisibilityChanged, overScrollBy, performButtonActionOnTouchDown, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, pointInView, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFocus, requestFocus, requestRectangleOnScreen, requestRectangleOnScreen, requireViewById, resetPivot, resolveSize, resolveSizeAndState, scheduleDrawable, scrollBy, scrollTo, setActivated, setAlpha, setAnimationMatrix, setBackground, setBottom, setClickable, setContextClickable, setDuplicateParentStateEnabled, setElevation, setEnabled, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setFocusedInCluster, setForeground, setForegroundGravity, setFrame, setHapticFeedbackEnabled, setHasTransientState, setHasTranslationTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setIsRootNamespace, setKeyboardNavigationCluster, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setVisibility, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, sp, startActionMode, startActionMode, startDragAndDrop, startNestedScroll, stopNestedScroll, toGlobalMotionEvent, toLocalMotionEvent, toString, transformFromViewToWindowSpace, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotDraw`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface icyllis.modernui.view.ViewParent

  `canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch`

- ## Field Details

  - ### TRUE

    public static final int TRUE
    See Also:
      - Constant Field Values

  - ### LEFT_OF

    public static final int LEFT_OF
    Rule that aligns a child's right edge with another child's left edge.
    See Also:
      - Constant Field Values

  - ### RIGHT_OF

    public static final int RIGHT_OF
    Rule that aligns a child's left edge with another child's right edge.
    See Also:
      - Constant Field Values

  - ### ABOVE

    public static final int ABOVE
    Rule that aligns a child's bottom edge with another child's top edge.
    See Also:
      - Constant Field Values

  - ### BELOW

    public static final int BELOW
    Rule that aligns a child's top edge with another child's bottom edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_BASELINE

    public static final int ALIGN_BASELINE
    Rule that aligns a child's baseline with another child's baseline.
    See Also:
      - Constant Field Values

  - ### ALIGN_LEFT

    public static final int ALIGN_LEFT
    Rule that aligns a child's left edge with another child's left edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_TOP

    public static final int ALIGN_TOP
    Rule that aligns a child's top edge with another child's top edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_RIGHT

    public static final int ALIGN_RIGHT
    Rule that aligns a child's right edge with another child's right edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_BOTTOM

    public static final int ALIGN_BOTTOM
    Rule that aligns a child's bottom edge with another child's bottom edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_PARENT_LEFT

    public static final int ALIGN_PARENT_LEFT
    Rule that aligns the child's left edge with its RelativeLayout parent's left edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_PARENT_TOP

    public static final int ALIGN_PARENT_TOP
    Rule that aligns the child's top edge with its RelativeLayout parent's top edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_PARENT_RIGHT

    public static final int ALIGN_PARENT_RIGHT
    Rule that aligns the child's right edge with its RelativeLayout parent's right edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_PARENT_BOTTOM

    public static final int ALIGN_PARENT_BOTTOM
    Rule that aligns the child's bottom edge with its RelativeLayout parent's bottom edge.
    See Also:
      - Constant Field Values

  - ### CENTER_IN_PARENT

    public static final int CENTER_IN_PARENT
    Rule that centers the child with respect to the bounds of its RelativeLayout parent.
    See Also:
      - Constant Field Values

  - ### CENTER_HORIZONTAL

    public static final int CENTER_HORIZONTAL
    Rule that centers the child horizontally with respect to the bounds of its RelativeLayout parent.
    See Also:
      - Constant Field Values

  - ### CENTER_VERTICAL

    public static final int CENTER_VERTICAL
    Rule that centers the child vertically with respect to the bounds of its RelativeLayout parent.
    See Also:
      - Constant Field Values

  - ### START_OF

    public static final int START_OF
    Rule that aligns a child's end edge with another child's start edge.
    See Also:
      - Constant Field Values

  - ### END_OF

    public static final int END_OF
    Rule that aligns a child's start edge with another child's end edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_START

    public static final int ALIGN_START
    Rule that aligns a child's start edge with another child's start edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_END

    public static final int ALIGN_END
    Rule that aligns a child's end edge with another child's end edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_PARENT_START

    public static final int ALIGN_PARENT_START
    Rule that aligns the child's start edge with its RelativeLayout parent's start edge.
    See Also:
      - Constant Field Values

  - ### ALIGN_PARENT_END

    public static final int ALIGN_PARENT_END
    Rule that aligns the child's end edge with its RelativeLayout parent's end edge.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### RelativeLayout

    public RelativeLayout(Context context)

- ## Method Details

  - ### shouldDelayChildPressedState

    public boolean shouldDelayChildPressedState()
    Description copied from class: `ViewGroup`
    Return true if the pressed state should be delayed for children or descendants of this ViewGroup. Generally, this should be done for containers that can scroll, such as a List. This prevents the pressed state from appearing when the user is actually trying to scroll the content.

    The default implementation returns true for compatibility reasons. Subclasses that do not scroll should generally override this method and return false.

    Overrides:
      `shouldDelayChildPressedState` in class `ViewGroup`

  - ### setIgnoreGravity

    public void setIgnoreGravity(int viewId)
    Defines which View is ignored when the gravity is applied. This setting has no effect if the gravity is `Gravity.START | Gravity.TOP`.
    Parameters:
      `viewId` - The id of the View to be ignored by gravity, or 0 if no View should be ignored.
    See Also:
      - `setGravity(int)`

  - ### getIgnoreGravity

    public int getIgnoreGravity()
    Get the id of the View to be ignored by gravity

  - ### getGravity

    public int getGravity()
    Describes how the child views are positioned.
    Returns:
      the gravity.
    See Also:
      - `setGravity(int)`
      - `Gravity`

  - ### setGravity

    public void setGravity(int gravity)
    Describes how the child views are positioned. Defaults to `Gravity.START | Gravity.TOP`.

    Note that since RelativeLayout considers the positioning of each child relative to one another to be significant, setting gravity will affect the positioning of all children as a single unit within the parent. This happens after children have been relatively positioned.

    Parameters:
      `gravity` - See `Gravity`
    See Also:
      - `setHorizontalGravity(int)`
      - `setVerticalGravity(int)`

  - ### setHorizontalGravity

    public void setHorizontalGravity(int horizontalGravity)

  - ### setVerticalGravity

    public void setVerticalGravity(int verticalGravity)

  - ### getBaseline

    public int getBaseline()
    Description copied from class: `View`

    Return the offset of the widget's text baseline from the widget's top boundary. If this widget does not support baseline alignment, this method returns -1.

    Overrides:
      `getBaseline` in class `View`
    Returns:
      the offset of the baseline within the widget's bounds or -1 if baseline alignment is not supported

  - ### requestLayout

    public void requestLayout()
    Description copied from class: `View`
    Call this when something has changed which has invalidated the layout of this view. This will schedule a layout pass of the view tree. This should not be called while the view hierarchy is currently in a layout pass (`View.isInLayout()`. If layout is happening, the request may be honored at the end of the current layout pass (and then layout will run again) or after the current frame is drawn and the next layout occurs.

    Subclasses which override this method should call the superclass method to handle possible request-during-layout errors correctly.

    Specified by:
      `requestLayout` in interface `ViewParent`
    Overrides:
      `requestLayout` in class `View`

  - ### onMeasure

    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
    Description copied from class: `View`
    Measure the view and its content to determine the measured width and the measured height. This method is invoked by `View.measure(int, int)` and should be overridden by subclasses to provide accurate and efficient measurement of their contents.

    CONTRACT: When overriding this method, you must call `View.setMeasuredDimension(int, int)` to store the measured width and height of this view. Failure to do so will trigger an `IllegalStateException`, thrown by `View.measure(int, int)`. Calling super.onMeasure() is a valid use.

    The base class implementation of measure defaults to the background size, unless a larger size is allowed by the MeasureSpec. Subclasses should override the base one to provide better measurements of their content.

    Overrides:
      `onMeasure` in class `View`
    Parameters:
      `widthMeasureSpec` - width measure specification imposed by the parent `MeasureSpec`
      `heightMeasureSpec` - height measure specification imposed by the parent `MeasureSpec`

  - ### onLayout

    protected void onLayout(boolean changed, int left, int top, int right, int bottom)
    Description copied from class: `View`
    Called from `View.layout(int, int, int, int)` when this view should assign a size and position to each of its children.

    Derived classes with children should override this method and call layout on each of their children.

    Specified by:
      `onLayout` in class `ViewGroup`
    Parameters:
      `changed` - This is a new size or position for this view
      `left` - Left position, relative to parent
      `top` - Top position, relative to parent
      `right` - Right position, relative to parent
      `bottom` - Bottom position, relative to parent

  - ### generateLayoutParams

    @Nonnull protected ViewGroup.LayoutParams generateLayoutParams(@Nonnull ViewGroup.LayoutParams lp)
    Description copied from class: `ViewGroup`
    Returns a safe set of layout parameters based on the supplied layout params. When a ViewGroup is passed a View whose layout params do not pass the test of `ViewGroup.checkLayoutParams(LayoutParams)`, this method is invoked. This method should return a new set of layout params suitable for this ViewGroup, possibly by copying the appropriate attributes from the specified set of layout params.
    Overrides:
      `generateLayoutParams` in class `ViewGroup`
    Parameters:
      `lp` - The layout parameters to convert into a suitable set of layout parameters for this ViewGroup.
    Returns:
      an instance of `ViewGroup.LayoutParams` or one of its descendants

  - ### generateDefaultLayoutParams

    @Nonnull protected ViewGroup.LayoutParams generateDefaultLayoutParams()
    Description copied from class: `ViewGroup`
    Returns a set of default layout parameters. These parameters are requested when the View passed to `ViewGroup.addView(View)` has no layout parameters already set. If null is returned, an exception is thrown from addView.
    Overrides:
      `generateDefaultLayoutParams` in class `ViewGroup`
    Returns:
      a set of default layout parameters

  - ### checkLayoutParams

    protected boolean checkLayoutParams(@Nullable ViewGroup.LayoutParams p)
    Description copied from class: `ViewGroup`
    Check whether given params fit to this view group.

    See also `ViewGroup.generateLayoutParams(LayoutParams)` See also `ViewGroup.generateDefaultLayoutParams()`

    Overrides:
      `checkLayoutParams` in class `ViewGroup`
    Parameters:
      `p` - layout params to check
    Returns:
      if params matched to this view group