树叶云鸿蒙OS教程:鸿蒙OS NestedScrollView

NestedScrollView

java.lang.Object

|—ohos.agp.components.Component

|—|—ohos.agp.components.ComponentContainer

|—|—|—ohos.agp.components.StackLayout

|—|—|—|—ohos.agp.components.ScrollView

|—|—|—|—|—ohos.agp.components.NestedScrollView

public class NestedScrollView
extends ScrollView

创建一个嵌套滚动组件。

嵌套滚动组件是一个 UI 元素,它允许在父可滚动内容内嵌套滚动内容。

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.ComponentContainer 继承的嵌套类/接口
ComponentContainer.ArrangeListener
从类 ohos.agp.components.ScrollView 继承的嵌套类/接口
ScrollView.ReboundEffectParams
从类 ohos.agp.components.StackLayout 继承的嵌套类/接口
StackLayout.LayoutConfig

字段摘要

从类 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
从类 ohos.agp.components.ScrollView 继承的字段
ROTATION_SENSITIVITY_DEFAULT, ROTATION_SENSITIVITY_HIGH, ROTATION_SENSITIVITY_LOW

构造函数摘要

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

方法总结

从类 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
从类 ohos.agp.components.ScrollView 继承的方法
addScrollPausePositionX, addScrollPausePositionY, doFling, doFlingX, doFlingY, fluentScrollBy, fluentScrollByX, fluentScrollByY, fluentScrollTo, fluentScrollXTo, fluentScrollYTo, getReboundEffect, getReboundEffectParams, isMatchViewport, setMatchViewportEnabled, setReboundEffect, setReboundEffectParams, setReboundEffectParams
从类 ohos.agp.components.StackLayout 继承的方法
createLayoutConfig, verifyLayoutConfig

构造函数详细信息

NestedScrollView

public NestedScrollView(Context context)

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

参数:

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

NestedScrollView

public NestedScrollView(Context context, AttrSet attrSet)

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

参数:

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

NestedScrollView

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

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

参数:

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

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/189702.html<

(0)
运维的头像运维
上一篇2025-03-31 07:57
下一篇 2025-03-31 07:58

相关推荐

  • Owned-NetworksVPS测评,美国2.5美元年实测数据与性能表现,美国VPS哪家好,美国VPS推荐

    Owned-NetworksVPS 2.5 美元年付方案实测结论:该方案在 2026 年属于极低成本的入门级测试节点,适合轻量级爬虫、个人博客或临时环境搭建,但受限于共享资源与单线带宽,不适合高并发或核心业务承载,在 2026 年云计算市场持续内卷的背景下,美国 VPS 推荐榜单中,Owned-Networks……

    2026-05-02
    0
  • Vultr怎么用,Vultr云服务器租用多少钱一个月

    在 2026 年,Vultr 凭借全球 32 个边缘节点、按秒计费的高性能云架构以及针对 AI 推理的 GPU 实例,依然是中小企业构建低延迟应用与跨境业务的首选方案,其综合性价比在同等配置下优于传统云厂商,随着全球数字化进程进入深水区,2026 年的云基础设施市场呈现出“边缘化”与“算力专用化”的显著特征,对……

    2026-05-02
    0
  • HostVenom美国是什么,HostVenom美国怎么样

    HostVenom 美国服务器在 2026 年凭借高防 BGP 架构与极致性价比,成为国内企业出海及游戏开发场景下的首选方案,其核心优势在于稳定规避网络波动与显著低于行业平均的防护成本,随着 2026 年全球数据中心合规性要求的升级,选择海外节点时,稳定性与合规性已成为决策的核心变量,HostVenom 美国服……

    2026-05-02
    0
  • HostVenomVPS测评,实测体验如何?HostVenomVPS好不好用

    HostVenom VPS 在 2026 年实测中展现出极高的性价比,特别适合需要低成本搭建海外独立站或轻量级应用的中小开发者,但在高并发场景下稳定性略逊于一线品牌,在 2026 年云计算市场格局重塑的背景下,HostVenom VPS 作为新兴的托管服务商,凭借灵活的计费模式与优化的网络架构,迅速在开发者社区……

    2026-05-02
    0
  • 美国virtonoVPS测评靠谱吗?virtonoVPS真实体验与数据对比

    美国VirtonoVPS在2026年的实测结论是:其基于LVE架构的独享资源方案在价格与性能的平衡上表现优异,特别适合需要高并发处理且预算敏感的小微跨境电商与独立站卖家,但在跨国网络延迟上略逊于原生CN2 GIA线路,随着2026年云计算市场的进一步洗牌,美国VPS服务商的竞争已从单纯的硬件堆砌转向架构优化与网……

    2026-05-02
    0

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注