鸿蒙OS开发文档 第28页

鸿蒙OS Component.MeasureSpec

Component.MeasureSpec java.lang.Object |—ohos.agp.components.Component.MeasureSpec @Deprecated public static class Component.MeasureSpec extends Object 已弃用。 此更改自 API 版本 6 起生效。已替换为 EstimateSpec 字段摘要 修饰符和类型 字段 描述 static int ESTIMATED_STATE_BIT_MASK 已弃用。 static int NOT_EXCEED 已弃用。 static int PRECISE 已弃用。 static int UNCONSTRAINT 已弃用。 构造函数摘要 构造函数 描述 MeasureSpec() 已弃用。 方法总结 修饰符和类型 方法 描述 static int getMeasureSpec(int size, int mode) 已弃用。 static int getMode(int measureSpec) 已弃用。 static int getSize(int measureSpec) 已弃用。 static int getSizeAndConfig(int size, int estimatedConfig, int childEstimatedConfig) 已弃用。 从类 java.lang.Object 继承的方法 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 字段详细信息 ESTIMATED_STATE_BIT_MASK @Deprecated public static final int ESTIMATED_STATE_BIT_MASK 已弃用。 估计大小的状态位 NOT_EXCEED @Deprecated public static final int NOT_EXCEED 已弃用。 在此模式下,已为子组件指定了最大尺寸。 子组件不能超过指定的大小。 PRECISE @Deprecated public static final int PRECISE 已弃用。 在这种模式下,父组件已经确定了子组件的确切大小。 UNCONSTRAINT @Deprecated public static final int UNCONSTRAINT 已弃用。 在这种模式下,父组件对子组件没有限制,这意味着子组件可以是任何它想要的大小。 构造函数详细信息 MeasureSpec @Deprecated public MeasureSpec() 已弃用。 方法详情 getMeasureSpec @Deprecated public static int getMeasureSpec(int size, int mode) 已弃用。 根据指定的大小和模式创建度量规范。 参数: 参数名称 参数描述 size 指示度量规范中包含的大小。 取值范围为 0 到(1 左移 MeasureSpec.MODE_SHIFT 位),包括 1。 mode...

鸿蒙OS Component.EstimateSpec

Component.EstimateSpec java.lang.Object |—ohos.agp.components.Component.EstimateSpec public static class Component.EstimateSpec extends Object 定义组件的度量规范。 EstimateSpec 封装了子组件从父组件继承的排列要求。 每个 EstimateSpec 指示对宽度或高度以及模式的要求。 EstimateSpec 有三种可能的模式:UNCONSTRAINT、PRECISE 和 NOT_EXCEED。 字段摘要 修饰符和类型 字段 描述 static int ESTIMATED_STATE_BIT_MASK 估计大小的状态位 static int NOT_EXCEED 在此模式下,已为子组件指定了最大尺寸。 static int PRECISE 在这种模式下,父组件已经确定了子组件的确切大小。 static int UNCONSTRAINT 在这种模式下,父组件对子组件没有限制,这意味着子组件可以是任何它想要的大小。 构造函数摘要 构造函数 描述 EstimateSpec() 方法总结 修饰符和类型 方法 描述 static int getChildSizeWithMode(int size, int estimatedConfig, int childEstimatedConfig) 根据指定的大小和模式为子组件创建度量规范。 static int getMode(int estimateSpec) 获取该组件的显示方式。 static int getSize(int estimateSpec) 从提供的估计规范中提取大小。 static int getSizeWithMode(int size, int mode) 根据指定的大小和模式创建度量规范。 从类 java.lang.Object 继承的方法 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 字段详细信息 ESTIMATED_STATE_BIT_MASK public static final int ESTIMATED_STATE_BIT_MASK 估计大小的状态位 NOT_EXCEED public static final int NOT_EXCEED 在此模式下,已为子组件指定了最大尺寸。 子组件不能超过指定的大小。 PRECISE public static final int PRECISE 在这种模式下,父组件已经确定了子组件的确切大小。 UNCONSTRAINT public static final int UNCONSTRAINT 在这种模式下,父组件对子组件没有限制,这意味着子组件可以是任何它想要的大小。 构造函数详细信息 EstimateSpec public EstimateSpec() 方法详情 getSizeWithMode public static int getSizeWithMode(int size, int mode) 根据指定的大小和模式创建度量规范。 参数: 参数名称 参数描述 size 指示度量规范中包含的宽度或高度。 mode 指示度量规范中包含的模式。 该值必须是 UNCONSTRAINT、PRECISE 或 NOT_EXCEED。 返回: 以模式返回大小。 getMode public static int getMode(int estimateSpec) 获取该组件的显示方式。 参数:...

鸿蒙OS Component.DragFeedbackProvider

Component.DragFeedbackProvider java.lang.Object |—ohos.agp.components.Component.DragFeedbackProvider public static class Component.DragFeedbackProvider extends Object 提供系统在拖放操作期间显示的图像(称为“拖动阴影”)。 开始拖动时传递一个 DragFeedbackProvider 对象对应的组件。 构造函数摘要 构造函数 描述 DragFeedbackProvider(Component component) 创建系统在拖放操作期间显示的图像(称为“拖动阴影”)。 方法总结 修饰符和类型 方法 描述 Component getComponent() 返回 DragFeedbackProvider 的组件。 从类 java.lang.Object 继承的方法 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 构造函数详细信息 DragFeedbackProvider public DragFeedbackProvider(Component component) 创建系统在拖放操作期间显示的图像(称为“拖动阴影”)。 参数: 参数名称 参数描述 component 阴影 方法详情 getComponent public final Component getComponent() 返回 DragFeedbackProvider 的组件。 返回: Component

鸿蒙OS Component.DefSpeechEventListener

Component.DefSpeechEventListener java.lang.Object |—ohos.agp.components.Component.DefSpeechEventListener public static class Component.DefSpeechEventListener extends Object implements Component.SpeechEventListener 提供在语音事件绑定到组件时调用的默认回调。 构造函数摘要 构造函数 描述 DefSpeechEventListener() 方法总结 修饰符和类型 方法 描述 boolean onSpeechEvent(Component component, SpeechEvent event) 当语音事件绑定到组件时调用。 从类 java.lang.Object 继承的方法 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 构造函数详细信息 DefSpeechEventListener public DefSpeechEventListener() 方法详情 onSpeechEvent public boolean onSpeechEvent(Component component, SpeechEvent event) 当语音事件绑定到组件时调用。 您需要实现此回调来处理语音事件。 指定者: 接口 Component.SpeechEventListener 中的 onSpeechEvent 参数: 参数名称 参数描述 component 表示绑定到语音事件的组件。 event 表示语音事件。 返回: 如果侦听器已经处理了语音事件,则返回 true; 否则返回 false。

鸿蒙OS AttrHelper

AttrHelper java.lang.Object |—ohos.agp.components.AttrHelper public class AttrHelper extends Object 将属性值的类型从字符串转换为整数或布尔值。 构造函数摘要 构造函数 描述 AttrHelper() 用于创建 AttrHelper 实例的默认构造函数。 方法总结 修饰符和类型 方法 描述 static int convertDimensionToPix(String value, float density, int defaultValue) 将尺寸值转换为像素数。 static int convertDimensionToPix(Context context, String value, int defaultValue) 将维度值转换为像素值。 static BlendMode convertValueToBlendMode(String value, BlendMode defaultValue) 将值从字符串转换为整数。 static boolean convertValueToBoolean(String value, boolean defaultValue) 将值从字符串转换为布尔值。 static Color convertValueToColor(String value) 将字符串转换为 Color 对象。 static ColorMatrix convertValueToColorMatrix(int value) 将值从 int 转换为 ColorMatrix 对象。 static Element convertValueToElement(String value) 将字符串转换为 Element 对象。 static float convertValueToFloat(String value, float defaultValue) 将字符串转换为浮点值。 static int convertValueToInt(String value, int defaultValue) 将值从字符串转换为整数。 static long convertValueToLong(String value, long defaultValue) 将字符串转换为长值。 static int fp2px(float value, float density) 根据屏幕密度将字体大小像素 (fp) 转换为像素值。 static int fp2px(float value, float density, float fontRatio) 根据屏幕密度和字体比率将字体大小像素 (fp) 值转换为像素值。 static int fp2px(float value, Context context) 根据屏幕上下文将字体大小像素 (fp) 转换为像素值。 static float getDensity(Context context) 获取显示密度。 static float getFontRatio(Context context) 获取字体比例。 static float px2fp(int value, Context context) 根据屏幕上下文将像素转换为字体大小的像素。 static float px2vp(int value, Context context) 根据屏幕上下文将像素转换为虚拟像素。 static int vp2px(float value, float density) 根据屏幕密度将虚拟像素 (vp) 转换为像素值。 static int vp2px(float value, Context context) 根据屏幕上下文将虚拟像素 (vp) 转换为像素值。 从类 java.lang.Object 继承的方法 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 构造函数详细信息 AttrHelper public AttrHelper() 用于创建 AttrHelper 实例的默认构造函数。 方法详情 getDensity public static float getDensity(Context context) 获取显示密度。 参数: 参数名称 参数描述 context 指示应用程序上下文。 返回: 返回显示密度。 getFontRatio public static float getFontRatio(Context context) 获取字体比例。 参数: 参数名称 参数描述 context 指示应用程序上下文。 返回: 返回字体比例。 convertValueToInt public static int convertValueToInt(String...

鸿蒙OS AdaptiveBoxLayout.LayoutConfig

AdaptiveBoxLayout.LayoutConfig java.lang.Object |—ohos.agp.components.ComponentContainer.LayoutConfig |—|—ohos.agp.components.AdaptiveBoxLayout.LayoutConfig public static class AdaptiveBoxLayout.LayoutConfig extends ComponentContainer.LayoutConfig 为 AdaptiveBoxLayout 实例中的子组件定义布局参数,包括它们的宽度、高度、边距和重力。 字段摘要 修饰符和类型 字段 描述 int alignment 表示组件的对齐值。 从类 ohos.agp.components.ComponentContainer.LayoutConfig 继承的字段 height, MATCH_CONTENT, MATCH_PARENT, width 构造函数摘要 构造函数 描述 LayoutConfig() 默认构造函数用于通过将宽度和高度设置为默认值 MATCH_CONTENT 来创建 AdaptiveBoxLayout.LayoutConfig 实例。 LayoutConfig(int width, int height) 用于通过指定宽度和高度来创建 AdaptiveBoxLayout.LayoutConfig 实例的构造函数。 LayoutConfig(int width, int height, int alignment) 用于通过指定宽度、高度和重力来创建 AdaptiveBoxLayout.LayoutConfig 实例的构造函数。 LayoutConfig(AdaptiveBoxLayout.LayoutConfig source) 一个构造函数,用于通过从现有实例中提取宽度、高度、边距和重力设置来创建 AdaptiveBoxLayout.LayoutConfig 实例。 LayoutConfig(ComponentContainer.LayoutConfig source) 用于通过从现有实例中提取宽度、高度和边距设置来创建 AdaptiveBoxLayout.LayoutConfig 实例的构造函数。 LayoutConfig(Context context, AttrSet attrSet) 用于根据上下文和属性集创建 AdaptiveBoxLayout.LayoutConfig 实例的构造函数。 方法总结 从类 ohos.agp.components.ComponentContainer.LayoutConfig 继承的方法 clone, getHorizontalEndMargin, getHorizontalStartMargin, getLayoutDirection, getMarginBottom, getMarginLeft, getMarginRight, getMargins, getMarginsLeftAndRight, getMarginsTopAndBottom, getMarginTop, isMarginsRelative, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginsLeftAndRight, setMarginsRelative, setMarginsTopAndBottom, setMarginTop 从类 java.lang.Object 继承的方法 equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 字段详细信息 alignment public int alignment 表示组件的对齐值。 仅支持水平方向。 构造函数详细信息 LayoutConfig public LayoutConfig() 默认构造函数用于通过将宽度和高度设置为默认值 MATCH_CONTENT 来创建 AdaptiveBoxLayout.LayoutConfig 实例。 LayoutConfig public LayoutConfig(int width, int height) 用于通过指定宽度和高度来创建 AdaptiveBoxLayout.LayoutConfig 实例的构造函数。 参数: 参数名称 参数描述 width 表示宽度,可以是具体的值,ComponentContainer.LayoutConfig.MATCH_PARENT,或者ComponentContainer.LayoutConfig.MATCH_CONTENT。 height 表示高度,可以是特定值,ComponentContainer.LayoutConfig.MATCH_PARENT,或ComponentContainer.LayoutConfig.MATCH_CONTENT。 LayoutConfig public LayoutConfig(int width, int height, int alignment) 用于通过指定宽度、高度和重力来创建 AdaptiveBoxLayout.LayoutConfig 实例的构造函数。 参数: 参数名称 参数描述 width 表示宽度,可以是具体的值,ComponentContainer.LayoutConfig.MATCH_PARENT,或者ComponentContainer.LayoutConfig.MATCH_CONTENT。 height 表示高度,可以是特定值,ComponentContainer.LayoutConfig.MATCH_PARENT,或ComponentContainer.LayoutConfig.MATCH_CONTENT。 alignment 表示对齐值。 LayoutConfig public LayoutConfig(Context context, AttrSet attrSet) 用于根据上下文和属性集创建 AdaptiveBoxLayout.LayoutConfig 实例的构造函数。 参数: 参数名称 参数描述 context 指示应用程序上下文。 attrSet 指示要使用的属性集。 LayoutConfig public LayoutConfig(ComponentContainer.LayoutConfig source)...

鸿蒙OS AdaptiveBoxLayout

AdaptiveBoxLayout java.lang.Object |—ohos.agp.components.Component |—|—ohos.agp.components.ComponentContainer |—|—|—ohos.agp.components.AdaptiveBoxLayout public class AdaptiveBoxLayout extends ComponentContainer 提供用于创建自适应框布局的方法。 自适应框布局会自动划分为具有相同宽度和可能不同高度的框的行和列。 框的宽度取决于布局宽度和每行中的框数,由布局策略指定。 只有在前一行被填满后才会开始新行。 每个盒子都包含一个子组件。 每个盒子的高度由它所包含的子组件的高度决定。 每行的高度由该行中最高的框确定。 布局的宽度只能设置为 MATCH_PARENT 或固定值。 可以为布局中的组件设置长度、宽度和对齐方式。 嵌套类摘要 修饰符和类型 类 描述 static class AdaptiveBoxLayout.LayoutConfig 为 AdaptiveBoxLayout 实例中的子组件定义布局参数,包括它们的宽度、高度、边距和重力。 从类 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.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 构造函数摘要 构造函数 描述 AdaptiveBoxLayout(Context context) 用于使用默认属性集和样式创建 AdaptiveBoxLayout 实例的默认构造函数。 AdaptiveBoxLayout(Context context, AttrSet attrSet) 用于在解析 XML 文件后使用指定的属性集和默认样式创建 AdaptiveBoxLayout 实例的构造函数。 AdaptiveBoxLayout(Context context, AttrSet attrSet, String styleName) 用于在 XML 文件解析后使用指定的属性集和指定的样式创建 AdaptiveBoxLayout 实例的构造函数。 方法总结 修饰符和类型 方法 描述 void addAdaptiveRule(int minWidth, int maxWidth, int columns) 添加一个自适应规则,指定宽度在指定范围内的布局中每行允许的框数。 void clearAdaptiveRules() 清除所有自适应规则。 ComponentContainer.LayoutConfig createLayoutConfig(Context context, AttrSet attrSet) 使用子组件的属性集创建布局参数。 void removeAdaptiveRule(int minWidth, int maxWidth, int columns) 删除指定的规则。 ComponentContainer.LayoutConfig verifyLayoutConfig(ComponentContainer.LayoutConfig config) 根据当前布局类型验证布局参数。 从类 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 构造函数详细信息 AdaptiveBoxLayout public AdaptiveBoxLayout(Context context) 用于使用默认属性集和样式创建 AdaptiveBoxLayout 实例的默认构造函数。 参数: 参数名称 参数描述 context 指示应用程序上下文。 AdaptiveBoxLayout public AdaptiveBoxLayout(Context context, AttrSet attrSet) 用于在解析 XML 文件后使用指定的属性集和默认样式创建 AdaptiveBoxLayout 实例的构造函数。 参数: 参数名称 参数描述 context 指示应用程序上下文。 attrSet 指示要使用的属性集。...

鸿蒙OS Component

Component java.lang.Object |—ohos.agp.components.Component public class Component extends Object 为用户界面 (UI) 提供基本组件。 每个组件在屏幕上占据一个矩形区域,负责在这个区域内进行绘制和事件处理。 Component 是控件的基类,用于创建交互式 UI 组件。 它的子类 ComponentContainer 是所有布局的基类,它定义了其他组件或组件组的布局属性。 嵌套类摘要 修饰符和类型 类 描述 static interface Component.BindStateChangedListener 提供当组件绑定到其窗口或从其窗口分离时要调用的回调。 static interface Component.CanAcceptScrollListener 提供要调用的侦听器来决定是否可以接受滚动手势。 static interface Component.ClickedListener 提供单击组件时要调用的回调。 static interface Component.ComponentStateChangedListener 为组件的状态更改事件提供回调。 static interface Component.ContourRefreshedListener 为用于为组件设置自定义 Contour 对象的回调提供侦听器。 static class Component.DefSpeechEventListener 提供在语音事件绑定到组件时调用的默认回调。 static interface Component.DoubleClickedListener 提供双击组件时要调用的回调。 static class Component.DragFeedbackProvider 提供系统在拖放操作期间显示的图像(称为“拖动阴影”)。 static interface Component.DraggedListener 提供当手势识别器将拖动事件分派到组件时要调用的回调。 static interface Component.DrawTask 实现绘图任务。 static interface Component.EditEventListener 提供侦听器来处理由键盘快捷键触发的编辑事件,当它们分发到组件时。 static interface Component.EstimateSizeListener 提供用于自定义尺寸(宽度/高度)估计过程的界面。 static class Component.EstimateSpec 定义组件的度量规范。 static class Component.FadeEffectEnum 枚举可以应用淡出效果的组件指示器的类型。 static interface Component.FocusChangedListener 提供当组件的焦点状态更改时要调用的回调。 static interface Component.ForwardHoverListener 提供在鼠标悬停事件转发到子组件之前调用的回调。 static interface Component.ForwardTouchListener 在将触摸事件转发到子组件之前提供要调用的回调。 static class Component.GestureType 枚举手势类型。 static interface Component.HoverEventListener 提供从组件调度悬停事件时要调用的回调。 static interface Component.KeyEventListener 提供从组件调度键事件时要调用的回调。 static class Component.LayoutDirection 枚举水平布局方向。 static interface Component.LayoutRefreshedListener 提供在再次布局组件时调用的回调。 static interface Component.LongClickedListener 提供从组件分派长触摸事件时要调用的回调。 static class Component.MeasureSpec 已弃用。 此更改自 API 版本 6 起生效。已替换为 EstimateSpec static interface Component.MouseEventListener 提供从组件分派鼠标事件时要调用的回调。 static interface Component.MousePointerStyleListener 提供一个监听器来观察鼠标指针样式的变化。 static interface Component.OnDragListener 将拖动事件分派到组件时调用的回调。 static interface Component.RotationEventListener 提供从组件分派旋转事件时要调用的回调。 static interface Component.ScaledListener 为组件的缩放事件提供回调。 static interface Component.ScrolledListener 提供从组件分派滚动事件时要调用的回调。 static class Component.ShadowDevice 表示窗口的阴影设备。 static class Component.ShadowMode 指示窗口的阴影模式。 static class...

鸿蒙OS ColumnSystem

ColumnSystem java.lang.Object |—ohos.agp.components.ColumnSystem public class ColumnSystem extends Object 表示可以适应不同屏幕尺寸和方向的响应式布局设计机制。 分栏系统可以作为 UI 布局的辅助定位工具,保证跨设备体验一致。 column system 具有三个基本属性:column, gutter, 和 margin。 Columns 用于在 UI 布局中定位。 不同屏幕尺寸的定位由列数决定。 当页边距和装订线符合规范时,根据实际设备宽度和列数自动计算列宽。 Gutters 用于控制元素之间的间距。 您可以根据屏幕大小定义不同的间距值,作为断点的统一规范。 要获得良好的视觉效果,请将装订线值设置为不大于边距值的值。 Margins 用于控制元素和屏幕边缘之间的填充。 您可以根据屏幕大小定义不同的边距,作为断点的统一规范。 字段摘要 修饰符和类型 字段 描述 static int BOTTOM_SHEET_TYPE 指示底部工作表的列类型。 static int BUBBLE_TYPE 指示气泡列类型。 static int CARD_DOUBLE_BUTTON_TYPE 指示卡片的双按钮列类型。 static int CARD_SINGLE_BUTTON_TYPE 指示卡片的单按钮列类型。 static int CARD_TYPE 表示卡片列类型。 static int CONTENT_TYPE 指示内容列类型。 static int CUSTOM_TYPE 表示自定义列类型。 static int DIALOG_TYPE 指示对话框列类型。 static int DOUBLE_BUTTON_TYPE 指示双按钮列类型。 static int LARGE_BOTTOMTAB_TYPE 指示大底部选项卡(即具有三个以上项目的底部选项卡)的列类型。 static int LARGE_TOOLBAR_TYPE 指示大工具栏的列类型(即具有四个或固定项的工具栏)。 static int MENU_TYPE 指示菜单列类型。 static int SINGLE_BUTTON_TYPE 指示单按钮列类型。 static int SMALL_BOTTOMTAB_TYPE 指示底部小选项卡(即具有三个或更少项目的底部选项卡)的列类型。 static int SMALL_TOOLBAR_TYPE 指示小工具栏(即具有两个或三个项目的工具栏)的列类型。 static int TOAST_TYPE 表示 toast 列类型。 构造函数摘要 构造函数 描述 ColumnSystem(Context context) 用于创建默认 ColumnSystem 实例的构造函数。 ColumnSystem(Context context, int columnType) 创建指定列类型的 ColumnSystem 实例。 方法总结 修饰符和类型 方法 描述 int getColumnType() 获取当前列系统的列类型。 float getColumnWidth(int columnCount) 获取指定列数的总宽度。 int getGutter() 获取列系统的间距宽度。 int getMargin() 获取列系统的边距宽度。 int getMaxColumnWidth() 获取指定列类型的最大列宽。 int getMinColumnWidth() 获取指定列类型的最小列宽。 int getSuggestedWidth() 获取当前列类型的宽度。 int getTotalColumnCount() 获取当前列系统中的总列数。 void setColumnType(int columnType)...

鸿蒙OS Clock

Clock java.lang.Object |—ohos.agp.components.Component |—|—ohos.agp.components.Text |—|—|—ohos.agp.components.Clock public class Clock extends Text 提供时钟控制。 此控件显示时钟。 当前时间根据配置的时区以 12 小时或 24 小时模式显示。 每种时间模式都有自己的显示格式。 嵌套类摘要 修饰符和类型 类 描述 static class Clock.TimeFormat 枚举时间格式。 从类 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 构造函数摘要 构造函数 描述 Clock(Context context) 默认构造函数用于使用默认属性集和样式创建 Clock 实例。 Clock(Context context, AttrSet attrSet) 用于在 XML 文件解析后使用指定的属性集和默认样式创建 Clock 实例的构造函数。 Clock(Context context, AttrSet attrSet, String styleName) 用于在 XML 文件解析后使用指定的属性集和指定的样式创建 Clock 实例的构造函数。 方法总结 修饰符和类型 方法 描述 CharSequence getFormatIn12HourMode() 以字符串形式返回 12 小时显示格式。 CharSequence getFormatIn24HourMode() 以字符串形式返回 24 小时时间显示格式。 long getTime() 获取时钟中的时间。 Clock.TimeFormat getTimeFormat() 获取时间格式。 String getTimeZone() 获取设置的时区。 boolean is24HourMode() 获取控件的时间模式。 void set24HourModeEnabled(boolean format24Hour) 已弃用。 void setFormatIn12HourMode(CharSequence format) 根据输入字符串设置 12 小时模式的显示格式。 void setFormatIn24HourMode(CharSequence format) 根据输入字符串设置 24 小时模式的显示格式。 void setTime(long time) 根据输入时间戳设置时钟的时间。 void setTimeFormat(Clock.TimeFormat timeFormat) 设置时间格式。 void setTimeZone(String timeZone) 设置当前时钟使用的时区。 从类 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 构造函数详细信息 Clock public Clock(Context context) 默认构造函数用于使用默认属性集和样式创建 Clock 实例。 参数: 参数名称 参数描述 context 指示应用程序上下文。 Clock public Clock(Context context,...