举报投诉联系我们 手机版 热门标签 名动网
您的位置:名动网 > 鸿蒙系统 鸿蒙OS TabList.Tab

鸿蒙系统 鸿蒙OS TabList.Tab

2023-03-17 18:20 鸿蒙OS开发文档

鸿蒙系统 鸿蒙OS TabList.Tab

鸿蒙系统

鸿蒙系统是由华为技术有限公司开发的一款嵌入式操作系统,它是一款基于Linux内核的多平台、多层次、多任务的实时操作系统。它采用了新的设计理念,将应用层、中间件层、内核层分开,使得应用开发者可以在不同的平台上进行应用开发。

鸿蒙系统采用了新的设计理念,将应用层、中间件层、内核层分开,使得应用开发者可以在不同的平台上进行应用开发。此外,鸿蒙系统还采用了新的安全机制,使得整个操作系统能够保证数据安全性。此外,鸿蒙系统还采用了新的存储机制,使得存储效率大大提升。

此外,鸿蒙系统还采用了新的图形界面设计理念,使得界面易于使用。此外,鸿蒙也集成了语音识别功能,使得人机交互更加便捷。此外,鸿蒙也集成了物联网功能,使得物体之间能够相互通信。

#include  
int main() 
{ 
    printf("Hello World!"); 
    return 0; 
} 

鸿蒙OS TabList.Tab

TabList.Tab

java.lang.Object

|---ohos.agp.components.Component

|---|---ohos.agp.components.Text

|---|---|---ohos.agp.components.TabList.Tab

public class TabList.Tab
extends Text

表示 TabList 中的选项卡。

您可以使用 TabList 对象来创建 Tab 对象。

Since:

3

嵌套类摘要

从类 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.Text 继承的嵌套类/接口
Text.ConversionType, Text.EditorActionListener, Text.FontFamilyType, Text.TextColorObserver, Text.TextObserver, Text.TextSizeObserver, Text.TextSizeType, Text.TruncationMode

字段摘要

从类 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.Text 继承的字段
AUTO_CURSOR_POSITION, AUTO_SCROLLING_FOREVER

构造函数摘要

构造函数 描述
Tab(Context context) 用于使用默认属性集和样式创建 Tab 实例的默认构造函数。
Tab(Context context, AttrSet attrSet) 用于在 XML 文件解析后使用指定的属性集和默认样式创建 Tab 实例的构造函数。
Tab(Context context, AttrSet attrSet, String styleName) 用于在 XML 文件解析后使用指定的属性集和指定的样式创建 Tab 实例的构造函数。

方法总结

修饰符和类型 方法 描述
Element getIconElement() 获取选项卡上显示的图标。
int getPosition() 获取选项卡在 TabList 中的位置。
TabList.Tab select() 选择一个选项卡。
TabList.Tab setIconElement(Element leftIcon) 设置选项卡上显示的元素图标。
从类 ohos.agp.components.Component 继承的方法
addDrawTask, addDrawTask, addScrolledListener, announceAccessibility, arrange, bindCornerMark, callOnClick, canScroll, clearFocus, createAnimatorProperty, disableFadeEffect, dispatchRestoreState, dispatchSaveState, draw, enableCornerMark, enableFadeEffect, enableSaveState, enableScrollBar, estimateSize, executeDoubleClick, executeLongClick, findComponentById, findComponentHolderById, 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, 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, informConfigurationChanged, invalidate, isBoundaryFadeEffectEnable, isBoundToWindow, isClickable, isClipToContourEnabled, isComponentDisplayed, isEnabled, isFadeEffected, isFocusable, isFocused, isIdentityMatrix, isLongClickOn, isPressed, isRtl, isSaveStateEnabled, isScrollbarFadingOn, isScrollBarOn, isScrollbarOverlapEnabled, isSelected, isSoundEnable, isTouchFocusable, isVibrationEffectEnabled, notifyAccessibility, onAttributeConfigChanged, onDrag, onRestoreState, 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, 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
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从类 ohos.agp.components.Text 继承的方法
addTextObserver, adjustCursorPosition, append, delete, delete, delete, getAdditionalLineSpacing, getAroundElements, getAroundElementsPadding, getAroundElementsRelative, getAutoFontSizeRule, getAutoFontSizeStep, getAutoScrollingCount, getAutoScrollingDuration, getBaseLine, getBottomElement, getBottonElement, getBoundingRect, getBubbleElement, getBubbleHeight, getBubbleWidth, getCombinedPaddingBottom, getCombinedPaddingEnd, getCombinedPaddingLeft, getCombinedPaddingRight, getCombinedPaddingStart, getCombinedPaddingTop, getCursorElement, getCustomInputMethodOptions, getEditableString, getEditingText, getEditorAction, getEditorActionText, getEndElement, getExtraInputData, getFadeEffectBoundaryWidth, getFont, getFontFamilyType, getFontFeatures, getFontVariations, getHint, getHintColor, getHyphenationStrategy, getInputFilters, getInputMethodLocales, getInputMethodOption, getJustifyStrategy, getLeftElement, getLetterSpacing, getLineBreakStrategy, getLineCount, getLineHeight, getLocales, getMaxAutoFontSize, getMaxTextHeight, getMaxTextLines, getMaxTextWidth, getMaxWidthInEms, getMinAutoFontSize, getMinTextHeight, getMinTextLines, getMinTextWidth, getMinWidthInEms, getNumOfFontHeight, getOffsetByCoordinates, getPaddingForText, getPrimaryLocale, getRichText, getRightElement, getSelectionColor, getSelectionEnd, getSelectionLeftBubbleElement, getSelectionLeftBubbleHeight, getSelectionLeftBubbleWidth, getSelectionRightBubbleElement, getSelectionRightBubbleHeight, getSelectionRightBubbleWidth, getSelectionStart, getStartElement, getText, getTextAlignment, getTextColor, getTextConversion, getTextDirectionStrategy, getTextHorizontalScale, getTextInputType, getTextShadowColor, getTextShadowOffsetX, getTextShadowOffsetY, getTextShadowRadius, getTextSize, getTextSize, getTextToBottomSpace, getTextToTopSpace, getTopElement, getTruncationMode, getUrls, insert, insert, isAdjustInputPanel, isAllUpperCase, isAutoFontSize, isAutoSelectEnabled, isEditable, isFallbackFontMetricsEnabled, isFocusedByTouch, isHyperLinkClickable, isInputMethodActive, isMultipleLine, isScrollable, isSoftInputVisibleOnFocus, isTextCursorVisible, isTextSelectable, length, lockEditingState, moveToPosition, onCustomInputMethodCommand, onLockEditingState, onRtlChanged, onTextEditorAction, onUnlockEditingState, removeTextObserver, setAdjustInputPanel, setAroundElements, setAroundElementsPadding, setAroundElementsRelative, setAutoCursorAdjustmentEnabled, setAutoFontSize, setAutoFontSize, setAutoFontSizeRule, setAutoFontSizeRule, setAutoScrollingCount, setAutoScrollingDuration, setAutoSelectEnabled, setBubbleElement, setBubbleElement, setBubbleHeight, setBubbleSize, setBubbleWidth, setCursorElement, setCursorElement, setCursorPosition, setCustomInputMethodOptions, setEditable, setEditorActionListener, setEditorActionText, setExtraInputData, setFadeEffectBoundaryWidth, setFallbackFontMetricsEnabled, setFont, setFontFamilyType, setFontFeatures, setFontVariations, setHint, setHint, setHintColor, setHyperLinkClickable, setHyperLinkColor, setHyphenationStrategy, setInputFilters, setInputMethodLocales, setInputMethodOption, setJustifyStrategy, setLeftBubbleHeight, setLeftBubbleSize, setLeftBubbleWidth, setLetterSpacing, setLineBreakStrategy, setLineHeight, setLines, setLineSpacing, setLocales, setMaxCharacters, setMaxTextHeight, setMaxTextLines, setMaxTextWidth, setMaxWidthInEms, setMinTextHeight, setMinTextLines, setMinTextWidth, setMinWidthInEms, setMultipleLine, setPaddingForText, setPrimaryLocale, setRichText, setRightBubbleHeight, setRightBubbleSize, setRightBubbleWidth, setScrollable, setSelection, setSelectionColor, setSelectionLeftBubbleElement, setSelectionLeftBubbleElement, setSelectionRightBubbleElement, setSelectionRightBubbleElement, setSoftInputVisibleOnFocus, setText, setText, setTextAlignment, setTextColor, setTextConversion, setTextCursorVisible, setTextDirectionStrategy, setTextHeight, setTextHorizontalScale, setTextInputType, setTextSelectable, setTextShadow, setTextSize, setTextSize, setTextWidth, setTextWidthInEms, setTruncationMode, startAutoScrolling, stopAutoScrolling, unlockEditingState

构造函数详细信息

Tab

public Tab(Context context)

用于使用默认属性集和样式创建 Tab 实例的默认构造函数。

参数:

参数名称 参数描述
context 指示应用程序上下文。

Tab

public Tab(Context context, AttrSet attrSet)

用于在 XML 文件解析后使用指定的属性集和默认样式创建 Tab 实例的构造函数。

参数:

参数名称 参数描述
context 指示应用程序上下文。
attrSet 指示要使用的属性集。

Tab

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

用于在 XML 文件解析后使用指定的属性集和指定的样式创建 Tab 实例的构造函数。

参数:

参数名称 参数描述
context 指示应用程序上下文。
attrSet 指示要使用的属性集。
styleName 指示要使用的样式名称。

方法详情

setIconElement

public TabList.Tab setIconElement(Element leftIcon)

设置选项卡上显示的元素图标。

参数:

参数名称 参数描述
leftIcon 指示要显示的元素图标。

返回:

返回选定的选项卡。

Since:

4

getIconElement

public Element getIconElement()

获取选项卡上显示的图标。

返回:

返回选项卡上显示的图标。

Since:

4

select

public TabList.Tab select()

选择一个选项卡。

此方法将选项卡状态更改为选中。

返回:

返回选定的选项卡。

getPosition

public int getPosition()

获取选项卡在 TabList 中的位置。

返回:

返回在 TabList 中添加的选项卡的位置。 如果没有添加选项卡,则返回 -1。

阅读全文
以上是名动网为你收集整理的鸿蒙系统 鸿蒙OS TabList.Tab全部内容。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
相关文章
© 2024 名动网 mdwl.vip 版权所有 联系我们