public class SuperTextView
extends android.widget.TextView
| 限定符和类型 | 类和说明 |
|---|---|
static class |
SuperTextView.Adjuster
Adjuster被设计用来在SuperTextView的绘制过程中插入一些操作。
|
static class |
SuperTextView.DrawableMode
状态图的显示模式。
|
static interface |
SuperTextView.OnDrawableClickedListener
用于监听 Drawable1 和 Drawable2 被点击的事件
需要注意,对于 Drawable1,只有在它不作为背景图使用使,才能触发点击事件。
|
static class |
SuperTextView.ScaleType
当 Drawable1 作为背景图时的剪裁模式
|
static class |
SuperTextView.ShaderMode
SuperTextView的渐变模式。
|
android.widget.TextView.BufferType, android.widget.TextView.OnEditorActionListener, android.widget.TextView.SavedStateandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnCapturedPointerListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener, android.view.View.OnUnhandledKeyEventListener| 限定符和类型 | 字段和说明 |
|---|---|
static int |
NO_COLOR
标识不进行颜色的更改
|
static float |
NO_ROTATE
标识不进行旋转
|
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z| 构造器和说明 |
|---|
SuperTextView(android.content.Context context)
简单的构造函数
|
SuperTextView(android.content.Context context,
android.util.AttributeSet attrs)
inflate Xml布局文件时会被调用
|
SuperTextView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
略
|
SuperTextView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
略
|
| 限定符和类型 | 方法和说明 |
|---|---|
SuperTextView |
addAdjuster(SuperTextView.Adjuster adjuster)
添加一个Adjuster。
|
SuperTextView.Adjuster |
getAdjuster()
获取最后一个
SuperTextView.Adjuster |
SuperTextView.Adjuster |
getAdjuster(int index)
获得index对应的
SuperTextView.Adjuster。 |
java.util.List<SuperTextView.Adjuster> |
getAdjusterList()
获得SuperTextView中的所有Adjuster,如果没有返回null
|
float |
getCorner()
获取SuperTextView的圆角大小
|
float[] |
getCorners()
获取SuperTextView的详细圆角信息,共4个圆角,每个圆角包含两个值。
|
android.graphics.drawable.Drawable |
getDrawable()
获取状态图,当状态图通过
setDrawableAsBackground(boolean) 设置为背景时,获取的就是背景图了。 |
android.graphics.drawable.Drawable |
getDrawable2()
获取状态图2号。
|
float |
getDrawable2Height()
获取状态图2的高度
|
float |
getDrawable2PaddingLeft()
获取状态图2相对于控件左边的边距。
|
float |
getDrawable2PaddingTop()
获取状态图2相对于控件上边的边距。
|
float |
getDrawable2Rotate()
获得第二个状态图的旋转角度。
|
int |
getDrawable2Tint()
获得第二个状态图的混合颜色。
|
float |
getDrawable2Width()
获取状态图2的宽度。
|
float |
getDrawableHeight()
获取状态图的高度
|
float |
getDrawablePaddingLeft()
获取状态图相对于控件左边的边距。
|
float |
getDrawablePaddingTop()
获取状态图相对于控件上边的边距。
|
float |
getDrawableRotate()
获得第一个状态图的旋转角度。
|
int |
getDrawableTint()
获得第一个状态图的混合颜色。
|
float |
getDrawableWidth()
获取状态图的宽度。
|
int |
getFrameRate()
获取当前SuperTextView在播放
SuperTextView.Adjuster 时的帧率。 |
int |
getPressBgColor()
获得当前按压背景色。
|
int |
getPressTextColor()
获得当前按压文字颜色色。
|
SuperTextView.ScaleType |
getScaleType()
当 Drawable1 被作为背景图时,获取其缩放模式。
|
int |
getShaderEndColor()
获取渐变色的结束颜色。
|
SuperTextView.ShaderMode |
getShaderMode()
获取渐变色模式。
|
int |
getShaderStartColor()
获取渐变色的起始颜色。
|
int |
getSolid()
获取填充颜色
|
SuperTextView.DrawableMode |
getStateDrawable2Mode()
获取状态图2的显示模式。
|
SuperTextView.DrawableMode |
getStateDrawableMode()
获取状态图的显示模式。
|
int |
getStrokeColor()
获取边框颜色
|
float |
getStrokeWidth()
获取控件边框宽度
|
int |
getTextFillColor()
获取文字的填充颜色,在开启文字描边时
setTextStroke(boolean) 默认为BLACK。 |
int |
getTextShaderEndColor()
获取文字渐变色的结束颜色。
|
SuperTextView.ShaderMode |
getTextShaderMode()
获取文字渐变色模式。
|
int |
getTextShaderStartColor()
获取文字渐变色的起始颜色。
|
int |
getTextStrokeColor()
获取文字描边的颜色
|
float |
getTextStrokeWidth()
获取文字描边的宽度
|
void |
invalidateDrawable(android.graphics.drawable.Drawable drawable) |
boolean |
isAutoAdjust()
检查是否开启
SuperTextView.Adjuster 功能。 |
boolean |
isDrawableAsBackground()
检查当前状态图是否被作为SuperTextView的背景图。
|
boolean |
isLeftBottomCornerEnable()
检查左下角是否设置成了圆角。
|
boolean |
isLeftTopCornerEnable()
检查左上角是否设置成了圆角。
|
boolean |
isRightBottomCornerEnable()
检查右下角是否设置成了圆角。
|
boolean |
isRightTopCornerEnable()
检查右上角是否设置成了圆角。
|
boolean |
isShaderEnable()
检查是否启用了渐变功能。
|
boolean |
isShowState()
检查是否显示状态图
|
boolean |
isShowState2()
检查是否显示状态图2。
|
boolean |
isTextShaderEnable()
检查是否启用了文字渐变功能。
|
boolean |
isTextStroke()
检查是否开启了文字描边
|
boolean |
onTouchEvent(android.view.MotionEvent event) |
SuperTextView.Adjuster |
removeAdjuster(int index)
移除指定位置的Adjuster。
|
int |
removeAdjuster(SuperTextView.Adjuster adjuster)
移除指定的Adjuster,如果包含的话。
|
SuperTextView |
setAutoAdjust(boolean autoAdjust)
设置是否开启
SuperTextView.Adjuster 功能。 |
SuperTextView |
setCorner(float corner)
设置圆角大小
|
SuperTextView |
setDrawable(android.graphics.Bitmap bitmap)
使用bitmap资源设置状态图1。
|
SuperTextView |
setDrawable(android.graphics.drawable.Drawable drawable)
设置状态图。
|
SuperTextView |
setDrawable(int drawableRes)
使用drawable资源设置状态图。
|
SuperTextView |
setDrawable2(android.graphics.Bitmap bitmap)
使用bitmap资源设置状态图2。
|
SuperTextView |
setDrawable2(android.graphics.drawable.Drawable drawable)
设置状态图2。
|
SuperTextView |
setDrawable2(int drawableRes)
使用drawable资源设置状态图2。
|
SuperTextView |
setDrawable2Height(float drawableHeight)
设置状态图2高度。
|
SuperTextView |
setDrawable2PaddingLeft(float drawablePaddingLeft)
设置状态图2相对于控件左边的边距。
|
SuperTextView |
setDrawable2PaddingTop(float drawablePaddingTop)
设置状态图2相对于控件上边的边距。
|
SuperTextView |
setDrawable2Rotate(float rotate)
设置第二个状态图的旋转角度。
|
SuperTextView |
setDrawable2Tint(int tintColor)
设置第二个状态图的混合颜色。
|
SuperTextView |
setDrawable2Width(float drawableWidth)
设置状态图2宽度。
|
SuperTextView |
setDrawableAsBackground(boolean drawableAsBackground)
设置是否将状态图作为SuperTextView的背景图。
|
SuperTextView |
setDrawableHeight(float drawableHeight)
设置状态图高度。
|
SuperTextView |
setDrawablePaddingLeft(float drawablePaddingLeft)
设置状态图相对于控件左边的边距。
|
SuperTextView |
setDrawablePaddingTop(float drawablePaddingTop)
设置状态图相对于控件上边的边距。
|
SuperTextView |
setDrawableRotate(float rotate)
设置第一个状态图的旋转角度。
|
SuperTextView |
setDrawableTint(int tintColor)
设置第一个状态图的混合颜色。
|
SuperTextView |
setDrawableWidth(float drawableWidth)
设置状态图宽度。
|
SuperTextView |
setFrameRate(int frameRate)
设置帧率,即每秒帧数。
|
SuperTextView |
setLeftBottomCornerEnable(boolean leftBottomCornerEnable)
设置左下角是否为圆角,可以单独控制SuperTextView的每一个圆角。
|
SuperTextView |
setLeftTopCornerEnable(boolean leftTopCornerEnable)
设置左上角是否为圆角,可以单独控制SuperTextView的每一个圆角。
|
void |
setOnDrawableClickedListener(SuperTextView.OnDrawableClickedListener onDrawableClickedListener)
设置一个监听器,用于监听 Drawable1 或者 Drawable2 的点击事件。
|
SuperTextView |
setPressBgColor(int pressBgColor)
获得当前按压背景色。
|
SuperTextView |
setPressTextColor(int pressTextColor)
获得当前按压文字色。
|
SuperTextView |
setRightBottomCornerEnable(boolean rightBottomCornerEnable)
设置右下角是否为圆角,可以单独控制SuperTextView的每一个圆角。
|
SuperTextView |
setRightTopCornerEnable(boolean rightTopCornerEnable)
设置右上角是否为圆角,可以单独控制SuperTextView的每一个圆角。
|
SuperTextView |
setScaleType(SuperTextView.ScaleType scaleType)
当 Drawable1 被作为背景图时,设置其缩放模式。
|
SuperTextView |
setShaderEnable(boolean shaderEnable)
设置是否启用渐变色功能。
|
SuperTextView |
setShaderEndColor(int shaderEndColor)
设置渐变结束色。
|
SuperTextView |
setShaderMode(SuperTextView.ShaderMode shaderMode)
设置渐变模式。
|
SuperTextView |
setShaderStartColor(int shaderStartColor)
设置渐变起始色。
|
SuperTextView |
setShowState(boolean showState)
设置是否显示状态图。
|
SuperTextView |
setShowState2(boolean showState)
设置是否显示状态图2
|
SuperTextView |
setSolid(int solid)
设置填充颜色
|
SuperTextView |
setStateDrawable2Mode(SuperTextView.DrawableMode stateDrawableMode)
设置状态图2显示模式。
|
SuperTextView |
setStateDrawableMode(SuperTextView.DrawableMode stateDrawableMode)
设置状态图显示模式。
|
SuperTextView |
setStrokeColor(int strokeColor)
设置边框颜色
|
SuperTextView |
setStrokeWidth(float strokeWidth)
设置控件边框宽度
|
SuperTextView |
setTextFillColor(int textFillColor)
设置文字的填充颜色,需要开启文字描边
setTextStroke(boolean) 才能生效。 |
SuperTextView |
setTextShaderEnable(boolean shaderEnable)
设置是否启用文字渐变色功能。
|
SuperTextView |
setTextShaderEndColor(int shaderEndColor)
设置文字渐变结束色。
|
SuperTextView |
setTextShaderMode(SuperTextView.ShaderMode shaderMode)
设置文字渐变模式。
|
SuperTextView |
setTextShaderStartColor(int shaderStartColor)
设置文字渐变起始色。
|
SuperTextView |
setTextStroke(boolean textStroke)
设置是否开启文字描边。
|
SuperTextView |
setTextStrokeColor(int textStrokeColor)
设置文字描边的颜色
|
SuperTextView |
setTextStrokeWidth(float textStrokeWidth)
设置文字描边的宽度,需要开启文字描边
setTextStroke(boolean) 才能生效。 |
void |
setTracker(Tracker tracker)
设置一个跟踪器,用于追踪 SuperTextView 绘制
|
SuperTextView |
setUrlImage(java.lang.String url)
将一个网络图片作为SuperTextView的StateDrawable,调用这个方法StateDrawable将会被设置为背景模式。
|
SuperTextView |
setUrlImage(java.lang.String url,
boolean asBackground)
将一个网络图片作为SuperTextView的StateDrawable。
|
void |
startAnim()
启动动画。
|
void |
stopAnim()
停止动画。
|
addExtraDataToAccessibilityNodeInfo, addTextChangedListener, append, append, autofill, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeScroll, debug, didTouchFocusSelect, drawableHotspotChanged, endBatchEdit, extractText, findViewsWithText, getAccessibilityClassName, getAutofillType, getAutofillValue, getAutoLinkMask, getAutoSizeMaxTextSize, getAutoSizeMinTextSize, getAutoSizeStepGranularity, getAutoSizeTextAvailableSizes, getAutoSizeTextType, getBaseline, getBreakStrategy, getCompoundDrawablePadding, getCompoundDrawables, getCompoundDrawablesRelative, getCompoundDrawableTintBlendMode, getCompoundDrawableTintList, getCompoundDrawableTintMode, getCompoundPaddingBottom, getCompoundPaddingEnd, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingStart, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomInsertionActionModeCallback, getCustomSelectionActionModeCallback, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFirstBaselineToTopHeight, getFocusedRect, getFontFeatureSettings, getFontVariationSettings, getFreezesText, getGravity, getHighlightColor, getHint, getHintTextColors, getHyphenationFrequency, getImeActionId, getImeActionLabel, getImeHintLocales, getImeOptions, getIncludeFontPadding, getInputExtras, getInputType, getJustificationMode, getKeyListener, getLastBaselineToBottomHeight, getLayout, getLetterSpacing, getLineBounds, getLineCount, getLineHeight, getLineSpacingExtra, getLineSpacingMultiplier, getLinksClickable, getLinkTextColors, getMarqueeRepeatLimit, getMaxEms, getMaxHeight, getMaxLines, getMaxWidth, getMinEms, getMinHeight, getMinLines, getMinWidth, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getSelectionEnd, getSelectionStart, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, getShowSoftInputOnFocus, getText, getTextClassifier, getTextColors, getTextCursorDrawable, getTextDirectionHeuristic, getTextLocale, getTextLocales, getTextMetricsParams, getTextScaleX, getTextSelectHandle, getTextSelectHandleLeft, getTextSelectHandleRight, getTextSize, getTotalPaddingBottom, getTotalPaddingEnd, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingStart, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasOverlappingRendering, hasSelection, isAllCaps, isCursorVisible, isElegantTextHeight, isFallbackLineSpacing, isHorizontallyScrollable, isInputMethodTarget, isSingleLine, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, moveCursorToVisibleOffset, onBeginBatchEdit, onCheckIsTextEditor, onCommitCompletion, onCommitCorrection, onCreateInputConnection, onDragEvent, onEditorAction, onEndBatchEdit, onGenericMotionEvent, onKeyDown, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPreDraw, onPrivateIMECommand, onResolvePointerIcon, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onTextContextMenuItem, onTrackballEvent, onWindowFocusChanged, performLongClick, removeTextChangedListener, sendAccessibilityEventUnchecked, setAllCaps, setAutoLinkMask, setAutoSizeTextTypeUniformWithConfiguration, setAutoSizeTextTypeUniformWithPresetSizes, setAutoSizeTextTypeWithDefaults, setBreakStrategy, setCompoundDrawablePadding, setCompoundDrawables, setCompoundDrawablesRelative, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawableTintBlendMode, setCompoundDrawableTintList, setCompoundDrawableTintMode, setCursorVisible, setCustomInsertionActionModeCallback, setCustomSelectionActionModeCallback, setEditableFactory, setElegantTextHeight, setEllipsize, setEms, setEnabled, setError, setError, setExtractedText, setFallbackLineSpacing, setFilters, setFirstBaselineToTopHeight, setFontFeatureSettings, setFontVariationSettings, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setHyphenationFrequency, setImeActionLabel, setImeHintLocales, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setJustificationMode, setKeyListener, setLastBaselineToBottomHeight, setLetterSpacing, setLineHeight, setLines, setLineSpacing, setLinksClickable, setLinkTextColor, setLinkTextColor, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaddingRelative, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSelectAllOnFocus, setSelected, setShadowLayer, setShowSoftInputOnFocus, setSingleLine, setSingleLine, setSpannableFactory, setText, setText, setText, setText, setText, setTextAppearance, setTextAppearance, setTextClassifier, setTextColor, setTextColor, setTextCursorDrawable, setTextCursorDrawable, setTextIsSelectable, setTextKeepState, setTextKeepState, setTextLocale, setTextLocales, setTextMetricsParams, setTextScaleX, setTextSelectHandle, setTextSelectHandle, setTextSelectHandleLeft, setTextSelectHandleLeft, setTextSelectHandleRight, setTextSelectHandleRight, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setWidth, showContextMenu, showContextMenuaddChildrenForAccessibility, addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, addTouchables, animate, announceForAccessibility, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasPointerCapture, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onStartTemporaryDetach, onVisibilityAggregated, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreDefaultFocus, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSoundEffectsEnabled, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDrawpublic static final int NO_COLOR
public static final float NO_ROTATE
public SuperTextView(android.content.Context context)
context - View运行的Context环境public SuperTextView(android.content.Context context,
android.util.AttributeSet attrs)
context - View运行的Context环境attrs - View在xml布局文件中配置的属性集合对象public SuperTextView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
context - attrs - defStyleAttr - public SuperTextView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
context - attrs - defStyleAttr - defStyleRes - public void invalidateDrawable(android.graphics.drawable.Drawable drawable)
invalidateDrawable 在接口中 android.graphics.drawable.Drawable.CallbackinvalidateDrawable 在类中 android.widget.TextViewpublic float[] getCorners()
getCorners(float).public float getCorner()
public SuperTextView setCorner(float corner)
corner - 圆角大小,默认值为0。会触发一次重绘。public int getSolid()
public SuperTextView setSolid(int solid)
solid - 控件填充颜色, 默认为Color.TRANSPARENT。会触发一次重绘。public float getStrokeWidth()
public SuperTextView setStrokeWidth(float strokeWidth)
strokeWidth - 描边宽度。会触发一次重绘。public int getStrokeColor()
Color.BLACK。public SuperTextView setStrokeColor(int strokeColor)
strokeColor - 描边颜色。默认为Color.BLACK。会触发一次重绘。public SuperTextView.Adjuster getAdjuster()
SuperTextView.AdjusterSuperTextView.Adjuster,如果存在的话。public SuperTextView.Adjuster getAdjuster(int index)
SuperTextView.Adjuster。index - 期望获得的Adjuster的index。public java.util.List<SuperTextView.Adjuster> getAdjusterList()
public SuperTextView addAdjuster(SuperTextView.Adjuster adjuster)
adjuster - SuperTextView.Adjuster。会触发一次重绘。public SuperTextView.Adjuster removeAdjuster(int index)
index - 期望移除的Adjuster的位置。public int removeAdjuster(SuperTextView.Adjuster adjuster)
adjuster - 需要被移除的Adjusterpublic boolean isTextStroke()
public SuperTextView setTextStroke(boolean textStroke)
setTextFillColor(int) 设置。textStroke - true表示开启文字描边。默认为false。会触发一次重绘。public int getTextStrokeColor()
public SuperTextView setTextStrokeColor(int textStrokeColor)
textStrokeColor - 设置文字描边的颜色。默认为Color.BLACK。会触发一次重绘。public int getTextFillColor()
setTextStroke(boolean) 默认为BLACK。public SuperTextView setTextFillColor(int textFillColor)
setTextStroke(boolean) 才能生效。默认为BLACK。textFillColor - 设置文字填充颜色。默认为Color.BLACK。会触发一次重绘。public float getTextStrokeWidth()
public SuperTextView setTextStrokeWidth(float textStrokeWidth)
setTextStroke(boolean) 才能生效。textStrokeWidth - 设置文字描边宽度。会触发一次重绘。public boolean isAutoAdjust()
SuperTextView.Adjuster 功能。public SuperTextView setAutoAdjust(boolean autoAdjust)
SuperTextView.Adjuster 功能。autoAdjust - true开启Adjuster功能。反之,关闭。会触发一次重绘。public boolean isLeftTopCornerEnable()
public SuperTextView setLeftTopCornerEnable(boolean leftTopCornerEnable)
leftTopCornerEnable - true左上角圆角化。会触发一次重绘。public boolean isRightTopCornerEnable()
public SuperTextView setRightTopCornerEnable(boolean rightTopCornerEnable)
rightTopCornerEnable - true右上角圆角化。会触发一次重绘。public boolean isLeftBottomCornerEnable()
public SuperTextView setLeftBottomCornerEnable(boolean leftBottomCornerEnable)
leftBottomCornerEnable - true左下角圆角化。会触发一次重绘。public boolean isRightBottomCornerEnable()
public SuperTextView setRightBottomCornerEnable(boolean rightBottomCornerEnable)
rightBottomCornerEnable - true右下角圆角化。会触发一次重绘。public android.graphics.drawable.Drawable getDrawable()
setDrawableAsBackground(boolean) 设置为背景时,获取的就是背景图了。public android.graphics.drawable.Drawable getDrawable2()
public SuperTextView setDrawable(android.graphics.drawable.Drawable drawable)
setShowState(boolean) 才能显示。会触发一次重绘。
当通过 setDrawableAsBackground(boolean) 将状态图设置为背景后,将会被作为SuperTextView的背景图。
通过 isDrawableAsBackground() 来检查状态图是否被设置成了背景。drawable - 状态图。public SuperTextView setDrawable2(android.graphics.drawable.Drawable drawable)
setShowState2(boolean)才能显示。会触发一次重绘。drawable - 状态图public SuperTextView setDrawable(int drawableRes)
setShowState(boolean)才能显示。会触发一次重绘。drawableRes - 状态图的资源idpublic SuperTextView setDrawable2(int drawableRes)
setShowState2(boolean)才能显示。会触发一次重绘。drawableRes - 状态图的资源idpublic SuperTextView setDrawable(android.graphics.Bitmap bitmap)
setShowState(boolean)才能显示。会触发一次重绘。bitmap - 要设置的图片public SuperTextView setDrawable2(android.graphics.Bitmap bitmap)
setShowState2(boolean)才能显示。会触发一次重绘。bitmap - 要设置的图片public boolean isShowState()
public SuperTextView setShowState(boolean showState)
showState - true,表示显示状态图。反之,不显示。会触发一次重绘。public boolean isDrawableAsBackground()
public SuperTextView setDrawableAsBackground(boolean drawableAsBackground)
setUrlImage(String) 和 setUrlImage(String, boolean)
可以使得SuperTextView能够自动下载网络图片,然后进行展示。drawableAsBackground - true,表示将Drawable作为背景图,其余所有对drawable的设置都会失效,直到该项为false。public boolean isShowState2()
public SuperTextView setShowState2(boolean showState)
showState - true,表示显示状态图2。反之,不显示。会触发一次重绘。public SuperTextView.DrawableMode getStateDrawableMode()
SuperTextView.DrawableMode 中查看所有支持的模式。SuperTextView.DrawableModepublic SuperTextView.DrawableMode getStateDrawable2Mode()
SuperTextView.DrawableMode 中查看所有支持的模式。SuperTextView.DrawableModepublic SuperTextView setStateDrawableMode(SuperTextView.DrawableMode stateDrawableMode)
SuperTextView.DrawableMode.CENTER。会触发一次重绘。
在 SuperTextView.DrawableMode 中查看所有支持的模式。stateDrawableMode - 状态图显示模式public SuperTextView setStateDrawable2Mode(SuperTextView.DrawableMode stateDrawableMode)
SuperTextView.DrawableMode.CENTER。会触发一次重绘。
在 SuperTextView.DrawableMode 中查看所有支持的模式。stateDrawableMode - 状态图2显示模式public float getDrawableWidth()
public float getDrawable2Width()
public SuperTextView setDrawableWidth(float drawableWidth)
drawableWidth - 状态图宽度public SuperTextView setDrawable2Width(float drawableWidth)
drawableWidth - 状态图2宽度public float getDrawableHeight()
public float getDrawable2Height()
public SuperTextView setDrawableHeight(float drawableHeight)
drawableHeight - 状态图高度public SuperTextView setDrawable2Height(float drawableHeight)
drawableHeight - 状态图2高度public float getDrawablePaddingLeft()
public float getDrawable2PaddingLeft()
public SuperTextView setDrawablePaddingLeft(float drawablePaddingLeft)
drawablePaddingLeft - 状态图左边距。public SuperTextView setDrawable2PaddingLeft(float drawablePaddingLeft)
drawablePaddingLeft - 状态图左边距。public float getDrawablePaddingTop()
public float getDrawable2PaddingTop()
public SuperTextView setDrawablePaddingTop(float drawablePaddingTop)
drawablePaddingTop - 状态图上边距。public SuperTextView setDrawable2PaddingTop(float drawablePaddingTop)
drawablePaddingTop - 状态图2上边距。public SuperTextView setDrawableTint(int tintColor)
如果需要还原为原来的颜色只需要设置颜色为 NO_COLOR.
tintColor - 目标混合颜色public int getDrawableTint()
默认为 NO_COLOR
public SuperTextView setDrawable2Tint(int tintColor)
如果需要还原为原来的颜色只需要设置颜色为 NO_COLOR.
tintColor - 目标混合颜色public int getDrawable2Tint()
默认为 NO_COLOR
public SuperTextView setDrawableRotate(float rotate)
如果需要恢复默认角度只需要设置为 NO_ROTATE.
rotate - 需要旋转的角度public float getDrawableRotate()
默认为 NO_ROTATE
public SuperTextView setDrawable2Rotate(float rotate)
如果需要恢复默认角度只需要设置为 NO_ROTATE.
rotate - 需要旋转的角度public float getDrawable2Rotate()
默认为 NO_ROTATE
public int getShaderStartColor()
public SuperTextView setShaderStartColor(int shaderStartColor)
setShaderEnable(boolean)后才能生效。会触发一次重绘。shaderStartColor - 渐变起始色public int getShaderEndColor()
public SuperTextView setShaderEndColor(int shaderEndColor)
setShaderEnable(boolean)后才能生效。会触发一次重绘。shaderEndColor - 渐变结束色public SuperTextView.ShaderMode getShaderMode()
SuperTextView.ShaderMode中可以查看所有支持的模式。
需要调用setShaderEnable(boolean)后才能生效。public SuperTextView setShaderMode(SuperTextView.ShaderMode shaderMode)
SuperTextView.ShaderMode中可以查看所有支持的模式。
需要调用setShaderEnable(boolean)后才能生效。shaderMode - 渐变模式public boolean isShaderEnable()
public SuperTextView setShaderEnable(boolean shaderEnable)
shaderEnable - true启用渐变功能。反之,停用。public int getTextShaderStartColor()
public SuperTextView setTextShaderStartColor(int shaderStartColor)
setTextShaderEnable(boolean)后才能生效。会触发一次重绘。shaderStartColor - 文字渐变起始色public int getTextShaderEndColor()
public SuperTextView setTextShaderEndColor(int shaderEndColor)
setShaderEnable(boolean)后才能生效。会触发一次重绘。shaderEndColor - 文字渐变结束色public SuperTextView.ShaderMode getTextShaderMode()
SuperTextView.ShaderMode中可以查看所有支持的模式。
需要调用setTextShaderEnable(boolean)后才能生效。public SuperTextView setTextShaderMode(SuperTextView.ShaderMode shaderMode)
SuperTextView.ShaderMode中可以查看所有支持的模式。
需要调用setTextShaderEnable(boolean)后才能生效。shaderMode - 文字渐变模式public boolean isTextShaderEnable()
public SuperTextView setTextShaderEnable(boolean shaderEnable)
shaderEnable - true启用文字渐变功能。反之,停用。public int getPressBgColor()
public SuperTextView setPressBgColor(int pressBgColor)
pressBgColor - 按压背景色public int getPressTextColor()
public SuperTextView setPressTextColor(int pressTextColor)
pressTextColor - 按压时文字颜色public int getFrameRate()
SuperTextView.Adjuster 时的帧率。默认为60fpspublic SuperTextView setFrameRate(int frameRate)
frameRate - 帧率public SuperTextView setUrlImage(java.lang.String url, boolean asBackground)
Engine,
然后通过ImageEngine.install(Engine)为SuperTextView的ImageEngine安装一个全局引擎,开发者可以在
Application.onCreate()中进行配置(需要注意任何时候新安装的引擎总会替换掉原本的引擎)。
在未设置引擎的情况下,SuperTextView仍然会通过内置的一个十分简易引擎去下载图片。url - 网络图片地址asBackground - 是否将下载的图片作为Background。
- false表示下载好的图片将作为SuperTextView的StateDrawable
- true表示将下载好的图片作为背景,效果和setDrawableAsBackground(boolean)
是一样的。public SuperTextView setUrlImage(java.lang.String url)
Engine,
然后通过ImageEngine.install(Engine)为SuperTextView的ImageEngine安装一个全局引擎,开发者可以在
Application.onCreate()中进行配置(需要注意任何时候新安装的引擎总会替换掉原本的引擎)。
在未设置引擎的情况下,SuperTextView仍然会通过内置的一个十分简易引擎去下载图片。url - 网络图片地址public void startAnim()
setAutoAdjust(boolean)为true才能看到。public void stopAnim()
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent 在类中 android.widget.TextViewpublic void setOnDrawableClickedListener(SuperTextView.OnDrawableClickedListener onDrawableClickedListener)
onDrawableClickedListener - public SuperTextView setScaleType(SuperTextView.ScaleType scaleType)
具体请参考 SuperTextView.ScaleType,默认缩放模式为 SuperTextView.ScaleType.CENTER
scaleType - public SuperTextView.ScaleType getScaleType()
public void setTracker(Tracker tracker)
tracker -