ComponentParentpublic class MagicLayout extends ComponentContainer
Components in a MagicLayout have seven adaptive features, including wrapping, stretching, scaling, extension,
proportion, equalization, and hiding.
MagicLayout will be put to the next line when there is not enough
space in the current line. The wrapping feature will not work if components are arranged vertically in the
layout.
MagicLayout can be stretched horizontally or vertically to adapt to
the layout.
MagicLayout can be scaled to adapt to the layout.MagicLayout varies depending
on the container.
MagicLayout are always arranged based on a proportion.MagicLayout can adapt to the size change of the layout with the
same space between adjacent components.
MagicLayout are displayed in the horizontal or vertical direction with
defined priorities. A component with a lower priority may be hidden if the current layout does not have sufficient
available space.
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
MagicLayout.LayoutConfig |
Specifies the layout parameters for components in a
MagicLayout. |
Component.BindStateChangedListener, Component.CanAcceptScrollListener, Component.ClickedListener, Component.ComponentStateChangedListener, Component.ContourRefreshedListener, Component.DefSpeechEventListener, Component.DoubleClickedListener, Component.DragFeedbackProvider, Component.DraggedListener, Component.DrawTask, Component.EditEventListener, Component.EstimateSizeListener, Component.EstimateSpec, Component.FadeEffectEnum, Component.FocusChangedListener, Component.ForwardHoverListener, Component.ForwardTouchListener, Component.GestureType, Component.HoverEventListener, Component.KeyEventListener, Component.LayoutDirection, Component.LayoutRefreshedListener, Component.LongClickedListener, Component.MeasureSpec, Component.MouseEventListener, Component.MousePointerStyleListener, Component.OnDragListener, Component.RotationEventListener, Component.ScaledListener, Component.ScrolledListener, Component.ShadowDevice, Component.ShadowMode, Component.ShadowSize, Component.SpeechEventListener, Component.TouchEventListener, Component.UnconsumedKeyEventListener, Component.VoiceEventComponentContainer.ArrangeListener| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
EQUALIZE_DEFAULT |
Indicates that the edges of a
MagicLayout are involved in equalization operations. |
static int |
EQUALIZE_NEAR_EDGE |
Indicates that the edges of a
MagicLayout are not involved in equalization operations. |
static int |
FOLD_OBVERSE |
Indicates that two adjacent components are wrapped with the left one remaining in the current line and the right
one put to the next line.
|
static int |
FOLD_REVERSE |
Indicates that two adjacent components are wrapped with the right one remaining in the current line and the left
one put to the next line.
|
ACCESSIBILITY_ADAPTABLE, ACCESSIBILITY_DISABLE, ACCESSIBILITY_ENABLE, AXIS_X, AXIS_Y, CONTOUR_BACKGROUND, CONTOUR_BORDER, CONTOUR_PADDING_BORDER, DEFAULT_SCALE, DRAG_DOWN, DRAG_HORIZONTAL, DRAG_HORIZONTAL_VERTICAL, DRAG_LEFT, DRAG_RIGHT, DRAG_UP, DRAG_VERTICAL, EVENT_TYPE_COMPONENT_ACCESSIBILITY_FOCUSED, EVENT_TYPE_COMPONENT_ACCESSIBILITY_FOCUSED_CLEAR, EVENT_TYPE_COMPONENT_CLICKED, EVENT_TYPE_COMPONENT_FOCUSED, EVENT_TYPE_COMPONENT_LONG_CLICKED, EVENT_TYPE_COMPONENT_SCROLLED, EVENT_TYPE_COMPONENT_SELECTED, EVENT_TYPE_COMPONENT_TEXT_UPDATE, EVENT_TYPE_NOTICE, EVENT_TYPE_NOTIFICATION_STATE_UPDATE, EVENT_TYPE_TOAST_SHOW, EVENT_TYPE_WINDOW_STATE_UPDATE, FOCUS_ADAPTABLE, FOCUS_DISABLE, FOCUS_ENABLE, FOCUS_NEXT, FOCUS_PREVIOUS, FOCUS_SIDE_BOTTOM, FOCUS_SIDE_LEFT, FOCUS_SIDE_RIGHT, FOCUS_SIDE_TOP, HIDE, HORIZONTAL, ID_DEFAULT, INHERITED_MODE, INVISIBLE, mBackgroundElement, mCanvasForTaskOverContent, mCanvasForTaskUnderContent, mComponentParent, mContext, mDrawTaskOverContent, mDrawTaskUnderContent, mEstimateSizeListener, mForegroundElement, mForwardHoverListener, mHoverEventListener, mKeyEventListener, mMouseEventListener, mPosition, mRotationEventListener, mShadowElement, mUnconsumedKeyEventListener, OVAL_MODE, OVAL_SCROLL_BAR_MODE, POSITION_X_INDEX, POSITION_Y_INDEX, RECT_MODE, RECT_SCROLL_BAR_MODE, SCROLL_AUTO_STAGE, SCROLL_IDLE_STAGE, SCROLL_NORMAL_STAGE, UNSPECIFIED_SCROLL_BAR_MODE, VERTICAL, VISIBLEFOCUS_CHILDREN_FIRST, FOCUS_CHILDREN_HIDE, FOCUS_PARENT_FIRST, mArrangeListener| 构造器 | 说明 |
|---|---|
MagicLayout(Context context) |
A constructor used to create a
MagicLayout instance using the default attribute set and style. |
MagicLayout(Context context,
AttrSet attrSet) |
A constructor used to create an
MagicLayout with the default attribute set after the XML file is parsed. |
MagicLayout(Context context,
AttrSet attrSet,
String styleName) |
A constructor used to create an
MagicLayout with the default attribute set and style after the XML file
is parsed. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
ComponentContainer.LayoutConfig |
createLayoutConfig(Context context,
AttrSet attrSet) |
Creates layout parameters using the attribute set of a child component.
|
int |
getAlignment() |
Obtains the alignment mode of components in the layout.
|
int |
getDefaultExtendMargin() |
Obtains the default margin between components in the
MagicLayout. |
int |
getEqualizeType() |
Obtains the equalization type.
|
int |
getExtendRevealLength() |
Obtains the revealed length of the component with the extension feature in the
MagicLayout. |
int |
getFoldAlignment() |
Obtains the alignment mode of components in each line after line wrapping has been performed.
|
int |
getFoldDirection() |
Obtains the direction for line wrapping.
|
int |
getMaxEqualizeMargin() |
Obtains the maximum margin between components in the
MagicLayout for equalization operations. |
int |
getMaxHeight() |
Obtains the maximum height of the
MagicLayout. |
int |
getMaxWidth() |
Obtains the maximum width of the
MagicLayout. |
int |
getMinEqualizeMargin() |
Obtains the minimum margin between components in the
MagicLayout for equalization operations. |
int |
getMinExtendMargin() |
Obtains the minimum margin between components in the
MagicLayout for extension operations. |
int |
getOrientation() |
Obtains the orientation in which the components are arranged in the layout.
|
boolean |
isEqualizeEnabled() |
Checks whether the equalization feature is enabled.
|
boolean |
isExtendEnabled() |
Checks whether the extension feature is enabled.
|
boolean |
isExtendRevealEnabled() |
Checks whether components that enable the extension feature in the
MagicLayout can be revealed. |
boolean |
isFoldEnabled() |
Checks whether line wrapping is enabled.
|
boolean |
isHideEnabled() |
Checks whether the hiding feature is enabled.
|
boolean |
isHorizontalStretchEnabled() |
Checks whether the horizontal stretching feature is enabled.
|
boolean |
isScaleEnabled() |
Checks whether the scaling feature is enabled.
|
boolean |
isVerticalStretchEnabled() |
Checks whether the vertical stretching feature is enabled.
|
boolean |
isWeightEnabled() |
Checks whether the proportion feature is enabled.
|
void |
setAlignment(int alignment) |
Sets how components are aligned in the remaining space (if any) of the
MagicLayout. |
void |
setDefaultExtendMargin(int defaultMargin) |
Sets the default margin between components in the
MagicLayout layout. |
void |
setEqualizeEnabled(boolean isEnabled) |
Sets whether to enable the equalization feature.
|
void |
setEqualizeType(int equalizeType) |
Sets an equalization type.
|
void |
setExtendEnabled(boolean isEnabled) |
Sets whether to enable the extension feature.
|
void |
setExtendRevealEnabled(boolean isEnabled) |
Sets whether components that enable the extension feature in the
MagicLayout can be revealed. |
void |
setExtendRevealLength(int revealLength) |
Sets the revealed length for a component with the extension feature in the
MagicLayout. |
void |
setFoldAlignment(int foldAlignment) |
Sets how components in each line are aligned after line wrapping.
|
void |
setFoldDirection(int foldDirection) |
Sets the direction for line wrapping, which is by default
MagicLayout.FOLD_OBVERSE. |
void |
setFoldEnabled(boolean isFoldEnabled) |
Sets whether to allow line wrapping, which puts a component to the next line if there is not enough space left
in the current line.
|
void |
setHideEnabled(boolean isEnabled) |
Sets whether to enable the hiding feature.
|
void |
setHorizontalStretchEnabled(boolean isEnabled) |
Sets whether to enable the horizontal stretching feature.
|
void |
setMaxEqualizeMargin(int maxMargin) |
Sets the maximum margin between components in the
MagicLayout for equalization operations. |
void |
setMaxHeight(int maxHeight) |
Sets the maximum height for the
MagicLayout. |
void |
setMaxWidth(int maxWidth) |
Sets the maximum width for the
MagicLayout. |
void |
setMinEqualizeMargin(int minMargin) |
Sets the minimum margin between components in the
MagicLayout for equalization operations. |
void |
setMinExtendMargin(int minMargin) |
Sets the minimum margin between components in the
MagicLayout for extension operations. |
void |
setMinHeight(int minHeight) |
Sets the minimum height for the
MagicLayout. |
void |
setMinWidth(int minWidth) |
Sets the minimum width for the
MagicLayout. |
void |
setOrientation(int orientation) |
Sets the orientation in which the components are arranged in the layout.
|
void |
setScaleEnabled(boolean isEnabled) |
Sets whether to enable the scaling feature.
|
void |
setVerticalStretchEnabled(boolean isEnabled) |
Sets whether to enable the vertical stretching feature.
|
void |
setWeightEnabled(boolean isEnabled) |
Sets whether to enable the proportion feature.
|
ComponentContainer.LayoutConfig |
verifyLayoutConfig(ComponentContainer.LayoutConfig config) |
Verifies layout parameters based on the current layout type.
|
addDrawTask, addDrawTask, addScrolledListener, announceAccessibility, arrange, bindCornerMark, callOnClick, canScroll, clearFocus, createAnimatorProperty, disableFadeEffect, draw, enableCornerMark, enableFadeEffect, enableSaveState, enableScrollBar, estimateSize, executeDoubleClick, executeLongClick, findFocus, findNextFocusableComponent, findRequestNextFocus, getAccessibility, getAccessibilityDescription, getAlpha, getAltitude, getBackgroundElement, getBaseLine, getBottom, getBoundaryFadeEffectBottomRate, getBoundaryFadeEffectLeftRate, getBoundaryFadeEffectRightRate, getBoundaryFadeEffectTopRate, getCenterZoomFactor, getCentralScrollMode, getClickedListener, getClipEnabled, getComponentDescription, getComponentMinSize, getComponentParent, getComponentPosition, getComponentSize, getComponentStateChangedListener, getComponentTreeObserver, getContentEnable, getContentPosition, getContentPositionX, getContentPositionY, getContext, getContour, getContourRefreshedListener, getCornerMark, getDragAcceptAngle, getDraggedListener, getEditEventListener, getEstimatedHeight, getEstimatedWidth, getFadeEffectBoundaryWidth, getFadeEffectColor, getFocusable, getFocusBorderEnable, getFocusBorderPadding, getFocusBorderRadius, getFocusBorderWidth, getForegroundElement, getForegroundGravity, getForwardHoverListener, getForwardTouchListener, getGesturePriority, getHeight, getHorizontalPadding, getHorizontalPosition, getHoverEventListener, getId, getKeyEventListener, getLayoutConfig, getLayoutDirection, getLayoutDirectionResolved, getLayoutRefreshedListener, getLeft, getLocationOnScreen, getMarginBottom, getMarginLeft, getMarginRight, getMargins, getMarginsLeftAndRight, getMarginsTopAndBottom, getMarginTop, getMatrix, getMinHeight, getMinWidth, getMode, getModeResolved, getMouseEventListener, getMousePointerStyleListener, getName, getPadding, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getPivot, getPivotX, getPivotY, getResourceManager, getRight, getRotation, getRotationEventListener, getRotationSensitivity, getScale, getScaledListener, getScaleX, getScaleY, getScrollbarBackgroundColor, getScrollbarColor, getScrollbarFadingDelay, getScrollbarFadingDuration, getScrollBarMode, getScrollbarRadius, getScrollbarRoundRect, getScrollbarStartAngle, getScrollbarSweepAngle, getScrollbarThickness, getScrollState, getScrollValue, getSelfVisibleRect, getShadowColor, getSpeechEventListener, getTag, getTop, getTouchEventListener, getTransitionSymbol, getTranslation, getTranslationX, getTranslationY, getTranslationZ, getUserNextFocus, getVerticalPadding, getVerticalPosition, getVisibility, getVisibleRectOnScreen, getWidth, getWindowVisibleRect, hasFocus, hasFocusedEffect, hasOverlaps, hideFocusBorder, invalidate, isBoundaryFadeEffectEnable, isBoundToWindow, isClickable, isClipToContourEnabled, isComponentDisplayed, isEnabled, isFadeEffected, isFocusable, isFocused, isIdentityMatrix, isLongClickOn, isPressed, isRtl, isSaveStateEnabled, isScrollbarFadingOn, isScrollBarOn, isScrollbarOverlapEnabled, isSelected, isSoundEnable, isTouchFocusable, isVibrationEffectEnabled, notifyAccessibility, onAttributeConfigChanged, onRestoreState, onRtlChanged, onSaveState, performScale, playSound, postLayout, refreshContour, release, removeBindStateChangedListener, removeScrolledListener, requestFocus, requestForceForwardTouchEvent, restoreComponentTreeState, saveComponentTreeState, scrollBy, scrollTo, setAccessibility, setAccessibilityDescription, setAlpha, setAltitude, setBackground, setBindStateChangedListener, setBottom, setBoundaryFadeEffectEnable, setCanAcceptScrollListener, setCenterZoomFactor, setCentralScrollMode, setClickable, setClickedListener, setClipEnabled, setClipToContourEnabled, setComponentDescription, setComponentMinSize, setComponentPosition, setComponentPosition, setComponentSize, setComponentStateChangedListener, setContentEnable, setContentPosition, setContentPositionX, setContentPositionY, setContour, setContourRefreshedListener, setDoubleClickedListener, setDragAcceptAngle, setDraggedListener, setEditEventListener, setEnabled, setEstimatedSize, setEstimateSizeListener, setFadeEffectBoundaryWidth, setFadeEffectColor, setFocusable, setFocusBorderEnable, setFocusBorderPadding, setFocusBorderRadius, setFocusBorderRadius, setFocusBorderWidth, setFocusChangedListener, setFocusedEffect, setForeground, setForegroundGravity, setForwardHoverListener, setForwardTouchListener, setGesturePriority, setHeight, setHorizontalPadding, setHorizontalPosition, setHoverEventListener, setId, setKeyEventListener, setLayoutConfig, setLayoutDirection, setLayoutRefreshedListener, setLeft, setLongClickable, setLongClickedListener, setMarginBottom, setMarginLeft, setMarginRight, setMarginsLeftAndRight, setMarginsTopAndBottom, setMarginTop, setMode, setMouseEventListener, setMousePointerStyleListener, setName, setOnDragListener, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRelative, setPaddingRight, setPaddingTop, setPivot, setPivot, setPivotX, setPivotY, setPosition, setPositionX, setPositionY, setPressState, setRight, setRotation, setRotationEventListener, setRotationSensitivity, setScale, setScaledListener, setScaleX, setScaleY, setScrollbarBackgroundColor, setScrollbarColor, setScrollbarFadingDelay, setScrollbarFadingDuration, setScrollbarFadingEnabled, setScrollBarMode, setScrollbarOverlapEnabled, setScrollbarRadius, setScrollbarRoundRect, setScrollbarStartAngle, setScrollbarSweepAngle, setScrollbarThickness, setScrolledListener, setSelected, setShadowColor, setShadowStyle, setSoundEnable, setSpeechEventListener, setTag, setTop, setTouchEventListener, setTouchFocusable, setTransitionSymbol, setTranslation, setTranslationX, setTranslationY, setTranslationZ, setUnconsumedKeyEventListener, setUserNextFocus, setVerticalPadding, setVerticalPosition, setVibrationEffectEnabled, setVisibility, setWidth, showFocusBorder, simulateClick, simulateDrag, startDragAndDrop, subscribeVoiceEvents, unsubscribeVoiceEventsaddComponent, addComponent, addComponent, addComponent, addComponent, dispatchRestoreState, dispatchSaveState, findComponentById, findComponentHolderById, getAutoLayout, getChildCount, getChildIndex, getComponentAt, getComponentTransition, getFocusOrder, getLayoutManager, informConfigurationChanged, isClipToChildBoundsEnabled, isClipToPaddingBoundsEnabled, isTouchEventSplitable, moveChildToFront, onDrag, removeAllComponents, removeComponent, removeComponentAt, removeComponentById, removeComponents, setArrangeListener, setAutoLayout, setAutoLayout, setClipToChildBoundsEnabled, setClipToPaddingBoundsEnabled, setComponentTransition, setFocusOrder, setLayoutManager, setTouchEventSplitablegetComponentParent, postLayoutpublic static final int EQUALIZE_DEFAULT
MagicLayout are involved in equalization operations.public static final int EQUALIZE_NEAR_EDGE
MagicLayout are not involved in equalization operations.public static final int FOLD_OBVERSE
public static final int FOLD_REVERSE
public MagicLayout(Context context)
MagicLayout instance using the default attribute set and style.context - Indicates the application context.public MagicLayout(Context context, AttrSet attrSet)
MagicLayout with the default attribute set after the XML file is parsed.context - Indicates the application context.attrSet - Indicates the attribute set to use.public MagicLayout(Context context, AttrSet attrSet, String styleName)
MagicLayout with the default attribute set and style after the XML file
is parsed.context - Indicates the application context.attrSet - Indicates the attribute set to use.styleName - Indicates the name of the style to use.public void setAlignment(int alignment)
MagicLayout. The default value is
LayoutAlignment.START for the horizontal direction and LayoutAlignment.TOP for the vertical
direction.alignment - Indicates the component alignment mode, as enumerated in
LayoutAlignment.public void setOrientation(int orientation)
orientation - Indicates the orientation in which components are arranged, which can be
Component.HORIZONTAL or Component.VERTICAL.public void setFoldEnabled(boolean isFoldEnabled)
Line wrapping will not take effect anyway if the width of the layout is MATCH_CONTENT or
orientation is Component.VERTICAL. When the width of a component is
MATCH_CONTENT, line wrapping may cause part of it to be invisible.
isFoldEnabled - Specifies whether line wrapping is enabled. true indicates that line wrapping is
enabled; false indicates the opposite case.public void setFoldDirection(int foldDirection)
MagicLayout.FOLD_OBVERSE.foldDirection - Indicates how two side-by-side components are wrapped. FOLD_OBVERSE indicates they
are wrapped in a way that the left one remains in the current line while the right one is put to the next line.
FOLD_REVERSE indicates they are wrapped in a way that the right one remains in the current line while
the left one is put to the next line.public void setFoldAlignment(int foldAlignment)
Vertical alignment modes take effect on components in the same line, and horizontal alignment modes take effect on components in different lines.
foldAlignment - Indicates the component alignment mode. The default value is LayoutAlignment.START
for the horizontal direction and LayoutAlignment.TOP for the vertical direction. For details about
alignment modes, see LayoutAlignment.public int getAlignment()
public int getOrientation()
Component.HORIZONTAL or Component.VERTICAL.public boolean isFoldEnabled()
false otherwise.public int getFoldDirection()
FOLD_OBVERSE or FOLD_REVERSE depending on how the wrapping direction has been
set via setFoldDirection(int).public int getFoldAlignment()
public void setHorizontalStretchEnabled(boolean isEnabled)
isEnabled - Specifies whether to enable the horizontal stretching feature. true means to enable it;
false means the opposite case.public boolean isHorizontalStretchEnabled()
true if the horizontal stretching feature is enabled; returns false otherwise.public void setVerticalStretchEnabled(boolean isEnabled)
isEnabled - Specifies whether to enable the vertical stretching feature. true means to enable it;
false means the opposite case.public boolean isVerticalStretchEnabled()
true if the vertical stretching feature is enabled; returns false otherwise.public void setWeightEnabled(boolean isEnabled)
isEnabled - Specifies whether to enable the proportion feature. true means to enable it;
false means the opposite case.public boolean isWeightEnabled()
true if the proportion feature is enabled; returns false otherwise.public boolean isScaleEnabled()
true if the scaling feature is enabled; returns false otherwise.public void setScaleEnabled(boolean isEnabled)
isEnabled - Specifies whether to enable the scaling feature. true means to enable it; false
means the opposite case.public int getMaxWidth()
MagicLayout.Integer.MAX_VALUE by default.public void setMaxWidth(int maxWidth)
MagicLayout.maxWidth - Indicates the maximum width to set, within the range [0, Integer.MAX_VALUE].public int getMaxHeight()
MagicLayout.Integer.MAX_VALUE by default.public void setMaxHeight(int maxHeight)
MagicLayout.maxHeight - Indicates the maximum height to set, within the range [0, Integer.MAX_VALUE].public void setExtendEnabled(boolean isEnabled)
isEnabled - true Specifies whether to enable the extension feature. true means to enable it;
false (default value) means the opposite case.public boolean isExtendEnabled()
true if the extension feature is enabled; returns false otherwise.public void setExtendRevealEnabled(boolean isEnabled)
MagicLayout can be revealed.isEnabled - Specifies whether components that enable the extension feature in the MagicLayout can be
revealed. true means that the components can be revealed; false (default value) means the
opposite case.public boolean isExtendRevealEnabled()
MagicLayout can be revealed.true if the components can be revealed; returns false otherwise.public void setExtendRevealLength(int revealLength)
MagicLayout.revealLength - Indicates the revealed length to set, within the range [0, Integer.MAX_VALUE].public int getExtendRevealLength()
MagicLayout.16 (in vp) by default.public void setDefaultExtendMargin(int defaultMargin)
MagicLayout layout.defaultMargin - Indicates the default margin to set, which takes effect when the extension feature is
enabled.public int getDefaultExtendMargin()
MagicLayout.MagicLayout#setDefaultExtendMargin(int defaultMargin). If
MagicLayout#setDefaultExtendMargin(int defaultMargin) is not called, 16 (in vp) is returned in
the case when the components with the extension feature can be revealed, and 0 (in vp) is
returned otherwise.public void setMinExtendMargin(int minMargin)
MagicLayout for extension operations.minMargin - Indicates the minimum margin to set, within the range [0, Integer.MAX_VALUE].public int getMinExtendMargin()
MagicLayout for extension operations.public void setMinWidth(int minWidth)
MagicLayout.setMinWidth 在类中 ComponentminWidth - Indicates the minimum width to set, within the range [0, Integer.MAX_VALUE].Component.getMinWidth()public void setMinHeight(int minHeight)
MagicLayout.setMinHeight 在类中 ComponentminHeight - Indicates the minimum height to set, within the range [0, Integer.MAX_VALUE].Component.getMinHeight()public void setHideEnabled(boolean isEnabled)
isEnabled - Specifies whether to enable the hiding feature. true means to enable it; false
means the opposite case.public boolean isHideEnabled()
true if the hiding feature is enabled; returns false otherwise.public void setEqualizeEnabled(boolean isEnabled)
ComponentContainer.LayoutConfig#getLayoutConfig().isEnabled - Specifies whether to enable the equalization feature. true means to enable it;
false means the opposite case.public boolean isEqualizeEnabled()
true if the equalization feature is enabled; returns false otherwise.public void setEqualizeType(int equalizeType)
equalizeType - Indicates the equalization type to set. The value can be MagicLayout.EQUALIZE_DEFAULT
or MagicLayout.EQUALIZE_NEAR_EDGE. The former means that the edges of the MagicLayout are
involved in equalization operations, and the latter means the opposite case.public int getEqualizeType()
MagicLayout.EQUALIZE_DEFAULT or MagicLayout.EQUALIZE_NEAR_EDGE. The former means
that the edges of the MagicLayout are involved in equalization operations, and the latter means
the opposite case.public void setMaxEqualizeMargin(int maxMargin)
MagicLayout for equalization operations.maxMargin - Indicates the maximum margin to set, within the range [0, Integer.MAX_VALUE].public int getMaxEqualizeMargin()
MagicLayout for equalization operations.public void setMinEqualizeMargin(int minMargin)
MagicLayout for equalization operations.minMargin - Indicates the minimum margin to set, within the range [0, Integer.MAX_VALUE].public int getMinEqualizeMargin()
MagicLayout for equalization operations.public ComponentContainer.LayoutConfig verifyLayoutConfig(ComponentContainer.LayoutConfig config)
ComponentContainerverifyLayoutConfig 在接口中 ComponentParentverifyLayoutConfig 在类中 ComponentContainerconfig - Indicates a group of layout parameters to be converted into a ComponentContainer instance.LayoutConfig instance, which represents the layout parameters.public ComponentContainer.LayoutConfig createLayoutConfig(Context context, AttrSet attrSet)
ComponentContainercreateLayoutConfig 在类中 ComponentContainercontext - Indicates the application context.attrSet - Indicates the attribute set.