public abstract class QMUITouchableSpan extends android.text.style.ClickableSpan implements ITouchableSpan
setPressed(boolean) 后根据是否 pressed 来触发不同的UI状态
提供设置 span 的文字颜色和背景颜色的功能, 在构造时传入
| 构造器和说明 |
|---|
QMUITouchableSpan(int normalTextColor,
int pressedTextColor,
int normalBackgroundColor,
int pressedBackgroundColor) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getNormalBackgroundColor() |
int |
getNormalTextColor() |
int |
getPressedBackgroundColor() |
int |
getPressedTextColor() |
boolean |
isPressed() |
void |
onClick(android.view.View widget) |
abstract void |
onSpanClick(android.view.View widget) |
void |
setIsNeedUnderline(boolean isNeedUnderline) |
void |
setPressed(boolean isSelected) |
void |
updateDrawState(android.text.TextPaint ds) |
public QMUITouchableSpan(int normalTextColor,
int pressedTextColor,
int normalBackgroundColor,
int pressedBackgroundColor)
public abstract void onSpanClick(android.view.View widget)
public final void onClick(android.view.View widget)
onClick 在接口中 ITouchableSpanonClick 在类中 android.text.style.ClickableSpanpublic int getNormalBackgroundColor()
public int getNormalTextColor()
public int getPressedBackgroundColor()
public int getPressedTextColor()
public void setPressed(boolean isSelected)
setPressed 在接口中 ITouchableSpanpublic boolean isPressed()
public void setIsNeedUnderline(boolean isNeedUnderline)
public void updateDrawState(android.text.TextPaint ds)
updateDrawState 在类中 android.text.style.ClickableSpan