日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OS TableLayout

TableLayout

創(chuàng)新互聯(lián)是一家專注于成都網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計與策劃設(shè)計,化德網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設(shè)10年,網(wǎng)設(shè)計領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:化德等地區(qū)。化德做網(wǎng)站價格咨詢:18980820575

java.lang.Object

|---ohos.agp.components.Component

|---|---ohos.agp.components.ComponentContainer

|---|---|---ohos.agp.components.TableLayout

public class TableLayout
extends ComponentContainer

提供用于在帶有表格的組件中排列組件的布局。

TableLayout 提供了對組件進行對齊和排列的接口,以用表格顯示組件中的組件。 可配置排列方式、行列數(shù)、元件位置。

Since:

3

嵌套類摘要

修飾符和類型描述
static interfaceTableLayout.Alignment為表格布局中的子組件提供對齊模式。
static classTableLayout.CellSpan在表格布局中存儲元素的跨度、起始單元格和結(jié)束單元格。
static classTableLayout.LayoutConfig提供表格布局所需的布局配置。
static classTableLayout.Specification配置表格布局中元素的列和行屬性。
從類 ohos.agp.components.Component 繼承的嵌套類/接口
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.VoiceEvent
從類 ohos.agp.components.ComponentContainer 繼承的嵌套類/接口
ComponentContainer.ArrangeListener

字段摘要

修飾符和類型字段描述
static intALIGN_CONTENTS指示子組件的邊距對齊方式。
static intALIGN_EDGES指示子組件的邊界對齊方式。
static intDEFAULT表示未定義的表格布局參數(shù)。
從類 ohos.agp.components.Component 繼承的字段
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, VISIBLE
從類 ohos.agp.components.ComponentContainer 繼承的字段
FOCUS_CHILDREN_FIRST, FOCUS_CHILDREN_HIDE, FOCUS_PARENT_FIRST, mArrangeListener

構(gòu)造函數(shù)摘要

構(gòu)造函數(shù)描述
TableLayout(Context context)用于使用默認(rèn)屬性集和樣式創(chuàng)建 TableLayout 實例的默認(rèn)構(gòu)造函數(shù)。
TableLayout(Context context, AttrSet attrSet)用于在 XML 文件解析后使用指定的屬性集和默認(rèn)樣式創(chuàng)建 TableLayout 實例的構(gòu)造函數(shù)。
TableLayout(Context context, AttrSet attrSet, String styleName)用于在 XML 文件解析后使用指定的屬性集和指定的樣式創(chuàng)建 TableLayout 實例的構(gòu)造函數(shù)。

方法總結(jié)

修飾符和類型方法描述
ComponentContainer.LayoutConfigcreateLayoutConfig(Context context, AttrSet attrSet)使用子組件的屬性集創(chuàng)建布局參數(shù)。
intgetAlignmentType()獲取表格布局中的對齊方式。
intgetColumnCount()獲取表格布局中的列數(shù)。
intgetOrientation()獲取表格布局的布局方向。
intgetRowCount()獲取表格布局中的行數(shù)。
voidsetAlignmentType(int type)設(shè)置表格布局中的對齊模式。
voidsetColumnCount(int columnCount)設(shè)置表格布局中的列數(shù)。
voidsetOrientation(int orientation)設(shè)置表格布局方向。
voidsetRowCount(int rowCount)設(shè)置表格布局中的行數(shù)。
static TableLayout.Specificationspecification(float weight)根據(jù)元素的權(quán)重返回規(guī)范實例。
static TableLayout.Specificationspecification(int start)根據(jù)表格布局中元素的起始位置返回規(guī)范實例。
static TableLayout.Specificationspecification(int start, float weight)根據(jù)表格布局中元素的起始位置和元素權(quán)重返回規(guī)范實例。
static TableLayout.Specificationspecification(int start, int size)根據(jù)表格布局中元素的起始位置和元素大小返回規(guī)范實例。
static TableLayout.Specificationspecification(int start, int size, float weight)根據(jù)表格布局中元素的起始位置以及元素大小和重量返回規(guī)范實例。
static TableLayout.Specificationspecification(int start, int size, int alignment)根據(jù)元素在表格布局中的起始位置以及元素大小和對齊方式獲取規(guī)范實例。
static TableLayout.Specificationspecification(int start, int size, int alignment, float weight)根據(jù)表格布局中元素的起始位置以及元素的大小、對齊方式和權(quán)重返回規(guī)范實例。
ComponentContainer.LayoutConfigverifyLayoutConfig(ComponentContainer.LayoutConfig config)根據(jù)當(dāng)前布局類型驗證布局參數(shù)。
從類 ohos.agp.components.Component 繼承的方法
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, setMinHeight, setMinWidth, 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, unsubscribeVoiceEvents
從類 ohos.agp.components.ComponentContainer 繼承的方法
addComponent, 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, setTouchEventSplitable
從接口 ohos.agp.components.ComponentParent 繼承的方法
getComponentParent, postLayout
從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

字段詳細(xì)信息

ALIGN_CONTENTS

public static final int ALIGN_CONTENTS

指示子組件的邊距對齊方式。

Since:

1

ALIGN_EDGES

public static final int ALIGN_EDGES

指示子組件的邊界對齊方式。

Since:

1

DEFAULT

public static final int DEFAULT

表示未定義的表格布局參數(shù)。

在創(chuàng)建規(guī)范對象實例時,如果表格中某個元素的起始位置沒有確定,可以使用spec(DEFAULT, weight)。

Since:

1

構(gòu)造函數(shù)詳細(xì)信息

TableLayout

public TableLayout(Context context)

用于使用默認(rèn)屬性集和樣式創(chuàng)建 TableLayout 實例的默認(rèn)構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱參數(shù)描述
context指示應(yīng)用程序上下文。

Since:

3

TableLayout

public TableLayout(Context context, AttrSet attrSet)

用于在 XML 文件解析后使用指定的屬性集和默認(rèn)樣式創(chuàng)建 TableLayout 實例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱參數(shù)描述
context指示應(yīng)用程序上下文。
attrSet指示要使用的屬性集。

Since:

3

TableLayout

public TableLayout(Context context, AttrSet attrSet, String styleName)

用于在 XML 文件解析后使用指定的屬性集和指定的樣式創(chuàng)建 TableLayout 實例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱參數(shù)描述
context指示應(yīng)用程序上下文。
attrSet指示要使用的屬性集。
styleName指示要使用的樣式名稱。

Since:

3

方法詳情

setColumnCount

public void setColumnCount(int columnCount)

設(shè)置表格布局中的列數(shù)。

如果沒有為子組件設(shè)置值,則使用父組件中的默認(rèn)列數(shù)。

參數(shù):

參數(shù)名稱參數(shù)描述
columnCount表示列數(shù)。

Since:

1

getColumnCount

public int getColumnCount()

獲取表格布局中的列數(shù)。

返回:

返回表格布局中的列數(shù)。

Since:

1

setRowCount

public void setRowCount(int rowCount)

設(shè)置表格布局中的行數(shù)。

如果沒有為子組件設(shè)置值,則使用父組件中的默認(rèn)行數(shù)。

參數(shù):

參數(shù)名稱參數(shù)描述
rowCount表示行數(shù)。

Since:

1

getRowCount

public int getRowCount()

獲取表格布局中的行數(shù)。

返回:

返回表格布局中的行數(shù)。

Since:

1

setOrientation

public void setOrientation(int orientation)

設(shè)置表格布局方向。

如果不調(diào)用此方法,則默認(rèn)使用 Component.HORIZONTAL。

參數(shù):

參數(shù)名稱參數(shù)描述
orientation指示表格布局方向。 Component.HORIZONTAL 表示組件水平排列; Component.VERTICAL 表示組件是垂直排列的。

Since:

1

getOrientation

public int getOrientation()

獲取表格布局的布局方向。

返回:

返回表格布局方向。 Component.HORIZONTAL 表示組件水平排列; Component.VERTICAL 表示組件是垂直排列的。

Since:

1

setAlignmentType

public void setAlignmentType(int type)

設(shè)置表格布局中的對齊模式。

如果不調(diào)用此方法,則默認(rèn)使用 ALIGN_CONTENTS。

參數(shù):

參數(shù)名稱參數(shù)描述
type表示表格布局中的對齊方式。 ALIGN_EDGES 表示邊界對齊; ALIGN_CONTENTS 表示邊距對齊。

Since:

4

getAlignmentType

public int getAlignmentType()

獲取表格布局中的對齊方式。

返回:

返回表格布局中的對齊方式。 如果使用邊界對齊模式,則返回 ALIGN_EDGES; 如果使用邊距對齊模式,則返回 ALIGN_CONTENTS。

Since:

4

specification

public static TableLayout.Specification specification(float weight)

根據(jù)元素的權(quán)重返回規(guī)范實例。 默認(rèn)位置為 DEFAULT。

參數(shù):

參數(shù)名稱參數(shù)描述
weight表示元素權(quán)重。 該值不能小于 0。

Since:

3

specification

public static TableLayout.Specification specification(int start)

根據(jù)表格布局中元素的起始位置返回規(guī)范實例。 默認(rèn)元素權(quán)重為 1。

參數(shù):

參數(shù)名稱參數(shù)描述
start指示元素在表格布局中的起始位置。 該值不能小于 0。

Since:

3

specification

public static TableLayout.Specification specification(int start, float weight)

根據(jù)表格布局中元素的起始位置和元素權(quán)重返回規(guī)范實例。

參數(shù):

參數(shù)名稱參數(shù)描述
start指示元素在表格布局中的起始位置。 該值不能小于 0。
weight表示元素權(quán)重。 該值不能小于 0。

Since:

3

specification

public static TableLayout.Specification specification(int start, int size)

根據(jù)表格布局中元素的起始位置和元素大小返回規(guī)范實例。

參數(shù):

參數(shù)名稱參數(shù)描述
start指示元素在表格布局中的起始位置。 該值不能小于 0。
size指示元素大小。 該值不能小于 0。

Since:

3

specification

public static TableLayout.Specification specification(int start, int size, float weight)

根據(jù)表格布局中元素的起始位置以及元素大小和重量返回規(guī)范實例。

參數(shù):

參數(shù)名稱參數(shù)描述
start指示元素在表格布局中的起始位置。 該值不能小于 0。
size指示元素大小。 該值不能小于 0。
weight表示元素權(quán)重。 該值不能小于 0。

Since:

3

specification

public static TableLayout.Specification specification(int start, int size, int alignment)

根據(jù)元素在表格布局中的起始位置以及元素大小和對齊方式獲取規(guī)范實例。

參數(shù):

參數(shù)名稱參數(shù)描述
start指示元素在表格布局中的起始位置。 該值不能小于 0。
size指示元素大小。 該值不能小于 0。
alignment指示元素的對齊方式。 ALIGN_EDGES 表示邊界對齊; ALIGN_CONTENTS 表示邊距對齊。

Since:

3

specification

public static TableLayout.Specification specification(int start, int size, int alignment, float weight)

根據(jù)表格布局中元素的起始位置以及元素的大小、對齊方式和權(quán)重返回規(guī)范實例。

參數(shù):

參數(shù)名稱參數(shù)描述
start指示元素在表格布局中的起始位置。 該值不能小于 0。
size指示元素大小。 該值不能小于 0。
alignment指示元素的對齊方式。 ALIGN_EDGES 表示邊界對齊; ALIGN_CONTENTS 表示邊距對齊。
weight表示元素權(quán)重。 該值不能小于 0。

Since:

3

verifyLayoutConfig

public ComponentContainer.LayoutConfig verifyLayoutConfig(ComponentContainer.LayoutConfig config)

從類復(fù)制的描述:ComponentContainer

根據(jù)當(dāng)前布局類型驗證布局參數(shù)。

指定者:

接口 ComponentParent 中的 verifyLayoutConfig

覆蓋:

ComponentContainer 類中的 verifyLayoutConfig

參數(shù):

參數(shù)名稱參數(shù)描述
config指示要轉(zhuǎn)換為 ComponentContainer 實例的一組布局參數(shù)。

返回:

返回 LayoutConfig 實例,它表示布局參數(shù)。

createLayoutConfig

public ComponentContainer.LayoutConfig createLayoutConfig(Context context, AttrSet attrSet)

從類復(fù)制的描述:ComponentContainer

使用子組件的屬性集創(chuàng)建布局參數(shù)。

覆蓋:

ComponentContainer 類中的 createLayoutConfig

參數(shù):

參數(shù)名稱參數(shù)描述
context指示應(yīng)用程序上下文。
attrSet表示屬性集。

返回:

返回創(chuàng)建的布局參數(shù)。


分享題目:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OS TableLayout
鏈接分享:http://m.5511xx.com/article/codojhc.html