Package icyllis.modernui.view

# Class WindowGroup

java.lang.Object
icyllis.modernui.view.View
icyllis.modernui.view.ViewGroup
icyllis.modernui.view.WindowGroup

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

@Internal public final class WindowGroup extends ViewGroup implements WindowManager
The root view of window view hierarchy, allowing for sub windows (panels), such as menu popups, tooltips and toasts.

- ## Nested Class Summary

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

  `ViewGroup.LayoutParams, 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`

  ## Nested classes/interfaces inherited from interface icyllis.modernui.view.WindowManager

  `WindowManager.LayoutParams`

- ## Field Summary

  ### 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
  `WindowGroup(Context context)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addView(View child, int index, ViewGroup.LayoutParams params)`
  Adds a child view with the specified layout parameters.
  `void`
  `clearChildFocus(View child)`
  Called when a child of this parent is giving up focus
  `void`
  `clearFocus()`
  Called when this view wants to give up focus.
  `protected boolean`
  `dispatchGenericPointerEvent(MotionEvent event)`
  Dispatch a generic motion event to the view under the first pointer.
  `protected boolean`
  `dispatchHoverEvent(MotionEvent event)`
  Dispatch a hover event.
  `boolean`
  `dispatchTouchEvent(MotionEvent ev)`
  Pass the touch screen motion event down to the target view, or this view if it is the target.
  `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.
  `protected boolean`
  `onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect)`
  Look for a descendant to call `View.requestFocus()` on.
  `PointerIcon`
  `onResolvePointerIcon(MotionEvent event)`
  Returns the pointer icon for the motion event, or null if it doesn't specify the icon.
  `protected void`
  `onViewAdded(View child)`
  Called when a new child is added to this ViewGroup.
  `void`
  `requestChildFocus(View child, View focused)`
  Called when a child of this parent wants focus

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

  `addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addTransientView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachViewToParent, bringChildToFront, checkLayoutParams, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearDisappearingChildren, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewByPredicateTraversal, findViewTraversal, focusableViewAvailable, focusSearch, generateDefaultLayoutParams, generateLayoutParams, 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, onSetLayoutParams, onStartNestedScroll, onStopNestedScroll, onViewRemoved, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeTransientView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestTransitionStart, resetResolvedDrawables, resolveDrawables, resolveLayoutDirection, resolveLayoutParams, resolvePadding, resolveRtlPropertiesIfNeeded, resolveTextAlignment, resolveTextDirection, restoreDefaultFocus, setAddStatesFromChildren, setBooleanFlag, setChildrenDrawingOrderEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutTransition, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, 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, getBaseline, 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, requestLayout, 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.ViewManager

  `addView, removeView, updateViewLayout`

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

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

- ## Constructor Details

  - ### WindowGroup

    public WindowGroup(@NonNull Context context)

- ## Method Details

  - ### dispatchTouchEvent

    public boolean dispatchTouchEvent(@NonNull MotionEvent ev)
    Description copied from class: `View`
    Pass the touch screen motion event down to the target view, or this view if it is the target.
    Overrides:
      `dispatchTouchEvent` in class `ViewGroup`
    Parameters:
      `ev` - The motion event to be dispatched.
    Returns:
      `true` if the event was handled by the view, `false` otherwise

  - ### dispatchHoverEvent

    protected boolean dispatchHoverEvent(@NonNull MotionEvent event)
    Description copied from class: `View`
    Dispatch a hover event.

    Do not call this method directly. Call `View.dispatchGenericMotionEvent(MotionEvent)` instead.

    Overrides:
      `dispatchHoverEvent` in class `ViewGroup`
    Parameters:
      `event` - The motion event to be dispatched.
    Returns:
      True if the event was handled by the view, false otherwise.

  - ### dispatchGenericPointerEvent

    protected boolean dispatchGenericPointerEvent(@NonNull MotionEvent event)
    Description copied from class: `View`
    Dispatch a generic motion event to the view under the first pointer.

    Do not call this method directly. Call `View.dispatchGenericMotionEvent(MotionEvent)` instead.

    Overrides:
      `dispatchGenericPointerEvent` in class `ViewGroup`
    Parameters:
      `event` - The motion event to be dispatched.
    Returns:
      True if the event was handled by the view, false otherwise.

  - ### onResolvePointerIcon

    public PointerIcon onResolvePointerIcon(@NonNull MotionEvent event)
    Description copied from class: `View`
    Returns the pointer icon for the motion event, or null if it doesn't specify the icon. The default implementation does not care the location or event types, but some subclasses may use it (such as WebViews).
    Overrides:
      `onResolvePointerIcon` in class `ViewGroup`
    Parameters:
      `event` - The MotionEvent from a mouse
    See Also:
      - `PointerIcon`

  - ### addView

    public void addView(@NonNull View child, int index, @NonNull ViewGroup.LayoutParams params)
    Description copied from class: `ViewGroup`
    Adds a child view with the specified layout parameters.

    Note: do not invoke this method from `View.draw(Canvas)`, `View.onDraw(Canvas)`, `ViewGroup.dispatchDraw(Canvas)` or any related method.

    Overrides:
      `addView` in class `ViewGroup`
    Parameters:
      `child` - the child view to add
      `index` - the position at which to add the child or -1 to add last
      `params` - the layout parameters to set on the child

  - ### onViewAdded

    protected void onViewAdded(View child)
    Description copied from class: `ViewGroup`
    Called when a new child is added to this ViewGroup. Overrides should always call super.onViewAdded.
    Overrides:
      `onViewAdded` in class `ViewGroup`
    Parameters:
      `child` - the added child view

  - ### onRequestFocusInDescendants

    protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect)
    Description copied from class: `ViewGroup`
    Look for a descendant to call `View.requestFocus()` on. Called by `ViewGroup.requestFocus(int, Rect)` when it wants to request focus within its children. Override this to customize how your `ViewGroup` requests focus within its children.
    Overrides:
      `onRequestFocusInDescendants` in class `ViewGroup`
    Parameters:
      `direction` - One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT
      `previouslyFocusedRect` - The rectangle (in this View's coordinate system) to give a finer grained hint about where focus is coming from. May be null if there is no hint.
    Returns:
      Whether focus was taken.

  - ### 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

  - ### requestChildFocus

    public void requestChildFocus(View child, View focused)
    Description copied from interface: `ViewParent`
    Called when a child of this parent wants focus
    Specified by:
      `requestChildFocus` in interface `ViewParent`
    Overrides:
      `requestChildFocus` in class `ViewGroup`
    Parameters:
      `child` - The child of this ViewParent that wants focus. This view will contain the focused view. It is not necessarily the view that actually has focus.
      `focused` - The view that is a descendant of child that actually has focus

  - ### clearChildFocus

    public void clearChildFocus(View child)
    Description copied from interface: `ViewParent`
    Called when a child of this parent is giving up focus
    Specified by:
      `clearChildFocus` in interface `ViewParent`
    Overrides:
      `clearChildFocus` in class `ViewGroup`
    Parameters:
      `child` - The view that is giving up focus

  - ### clearFocus

    public void clearFocus()
    Description copied from class: `View`
    Called when this view wants to give up focus. If focus is cleared `View.onFocusChanged(boolean, int, Rect)` is called.

    Note: When not in touch-mode, the framework will try to give focus to the first focusable View from the top after focus is cleared. Hence, if this View is the first from the top that can take focus, then all callbacks related to clearing focus will be invoked after which the framework will give focus to this view.

    Overrides:
      `clearFocus` in class `ViewGroup`