| 限定符和类型 | 类 | 说明 |
|---|---|---|
static interface |
IndexBar.OnSelectedListener |
Callback to listen for and index change events of a index bar.
|
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.VoiceEventACCESSIBILITY_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| 构造器 | 说明 |
|---|---|
IndexBar(Context context) |
A constructor used to create an
IndexBar instance based on the context. |
IndexBar(Context context,
AttrSet attrSet) |
A constructor used to create an
IndexBar instance based on the context and attribute set
after the XML file is parsed. |
IndexBar(Context context,
AttrSet attrSet,
String styleName) |
A constructor used to create an
IndexBar instance based on the context,
attribute set, and style after the XML file is parsed. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getIndexBarStatus() |
Obtains the status of
IndexBar. |
Paint |
getIndexPaint() |
Obtains the paint of this index bar.
|
float |
getIndexRadius() |
Obtains the radius of this index bar.
|
String[] |
getIndexString() |
Obtains the index array of this index bar.
|
Paint |
getIndexStringPaint() |
Obtains the paint of index strings on this index bar.
|
int |
getMaxCount() |
Obtains the maximum number of indexes on this index bar.
|
int |
getMinCount() |
Obtains the minimum number of indexes on this index bar.
|
IndexBar.OnSelectedListener |
getSelectedCallback() |
Obtains the listener for monitoring the selection of this index bar.
|
int |
getSelectedCount() |
Obtains the index number of the string displayed on an index bar.
|
Paint |
getSelectedPaint() |
Obtains the paint of the selected area on this index bar.
|
String |
getSelectedString() |
Obtains the selected string.
|
Paint |
getStringSelectedPaint() |
Obtains the paint of a selected string.
|
void |
languageSwitch(String[] characterStrings) |
Switch to another language.
|
void |
setIndexBarExpandedStatus(boolean expanded) |
Sets whether the index bar is expanded.
|
void |
setIndexPaint(Paint paint) |
Sets a paint for drawing a circle on an index bar.
|
void |
setIndexRadius(float radius) |
Sets the radius for an index bar.
|
void |
setIndexString(String[] indexString,
Paint paint) |
Sets the index string on the index bar and the corresponding paint used to draw the string.
|
void |
setMaxCount(int maxCount) |
Sets the maximum number of indexes on this index bar.
|
void |
setMinCount(int minCount) |
Sets the minimum number of indexes on this index bar.
|
void |
setMinCountAndMaxCount(int minCount,
int maxCount) |
Sets the maximum and minimum numbers of indexes on this index bar.
|
void |
setSelectedCallback(IndexBar.OnSelectedListener listener) |
Sets a listener to observe change events of an index bar.
|
void |
setSelectedCount(int count) |
Sets the index number to select on an index bar.
|
void |
setSelectedPaint(Paint paint) |
Sets the attribute of the selected paint used to draw a circle on the index bar.
|
void |
setSelectedString(String indexString) |
Set the index bar selected string.
|
void |
setStringSelectedPaint(Paint paint) |
Sets the attribute of the selected paint used to draw a string on the index bar.
|
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, 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, 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, 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, unsubscribeVoiceEventspublic IndexBar(Context context)
IndexBar instance based on the context.context - Indicates the application context.public IndexBar(Context context, AttrSet attrSet)
IndexBar instance based on the context and attribute set
after the XML file is parsed.context - Indicates the application context.attrSet - Indicates the attribute set of the index bar. For details, see AttrSet.public IndexBar(Context context, AttrSet attrSet, String styleName)
IndexBar instance based on the context,
attribute set, and style after the XML file is parsed.context - Indicates the application context.attrSet - Indicates the attribute set of the index bar. For details, see AttrSet.styleName - Indicates the style to use.public void setIndexRadius(float radius)
radius - Indicates the radius of the index bar.public float getIndexRadius()
public void setIndexPaint(Paint paint)
paint - Indicates the paint to set for drawing a circle on the index bar.public void setIndexString(String[] indexString, Paint paint)
indexString - Indicates the index string to display on the index bar.paint - Indicates the paint used to draw the index string.public void languageSwitch(String[] characterStrings)
characterStrings - Indicates the index string to display on the index bar.public String[] getIndexString()
public void setSelectedCallback(IndexBar.OnSelectedListener listener)
listener - Indicates the listener to set for the index bar.public IndexBar.OnSelectedListener getSelectedCallback()
public void setSelectedCount(int count)
count - Indicates the index number to select on the index bar.public void setSelectedPaint(Paint paint)
paint - Indicates the attribute of the selected paint used to draw a circle on the index bar.public void setStringSelectedPaint(Paint paint)
paint - indicates the attribute of the selected paint used to draw a string.public void setIndexBarExpandedStatus(boolean expanded)
expanded - Indicates the status of IndexBar. True indicates the IndexBar is
expanded; False indicates the IndexBar is collapsed.public int getIndexBarStatus()
IndexBar.IndexBar. 0 indicates the index bar has been collapsed; 1
indicates the index bar is being expanded; 2 indicates the index bar is being collapsed;
3 indicates the index bar has been expanded.public int getSelectedCount()
public void setSelectedString(String indexString)
indexString - Indicates the selected item index string.public String getSelectedString()
public void setMaxCount(int maxCount)
maxCount - Indicates the maximum number of indexes to set.The maxcount value range must in [30,40],
otherwise, the setting does not take effect.public int getMaxCount()
public void setMinCount(int minCount)
minCount - Indicates the minimum number of indexes to set. The value must be less than the value of
maxCount to ensure that the setting can take effect.public int getMinCount()
public void setMinCountAndMaxCount(int minCount,
int maxCount)
minCount - Indicates the minimum number of indexes to set,and the value must be greater than or equal to 1
and less than max, otherwise, the setting does not take effect.maxCount - Indicates the maximum number of indexes to set,and the value range must in [30,40],
otherwise, the setting does not take effect.public Paint getIndexPaint()
public Paint getIndexStringPaint()
public Paint getSelectedPaint()
public Paint getStringSelectedPaint()