public class RTextViewHelper extends RBaseHelper<android.widget.TextView>
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
ICON_DIR_BOTTOM |
static int |
ICON_DIR_LEFT |
static int |
ICON_DIR_RIGHT |
static int |
ICON_DIR_TOP |
protected boolean |
mHasPressedTextColor
是否设置对应的属性
|
protected boolean |
mHasSelectedTextColor |
protected boolean |
mHasUnableTextColor |
protected int |
mPaddingBottom |
protected int |
mPaddingLeft |
protected int |
mPaddingRight |
protected int |
mPaddingTop |
protected int |
mTextColorNormal |
protected int |
mTextColorPressed |
protected int |
mTextColorSelected |
protected android.content.res.ColorStateList |
mTextColorStateList |
protected int |
mTextColorUnable |
protected int[][] |
states |
BG_TYPE_COLOR, BG_TYPE_COLOR_ARRAY, BG_TYPE_IMG, mContext, mView| 构造器和说明 |
|---|
RTextViewHelper(android.content.Context context,
android.widget.TextView view,
android.util.AttributeSet attrs) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getIconDirection() |
int |
getIconHeight() |
android.graphics.drawable.Drawable |
getIconNormal() |
android.graphics.drawable.Drawable |
getIconPressed() |
android.graphics.drawable.Drawable |
getIconSelected() |
android.graphics.drawable.Drawable |
getIconUnable() |
int |
getIconWidth() |
int |
getTextColorNormal() |
int |
getTextColorPressed() |
int |
getTextColorSelected() |
int |
getTextColorUnable() |
java.lang.String |
getTypefacePath() |
void |
onTouchEvent(android.view.MotionEvent event)
触摸事件逻辑
备注:用于库内确定逻辑的调用,不建议开发者直接调用
|
void |
setEnabled(boolean enabled)
设置是否启用
备注:用于库内确定逻辑的调用,不建议开发者直接调用
|
protected void |
setIcon(android.graphics.drawable.Drawable icon)
主要用于子类调用
备注:用于库内确定逻辑的调用,不建议开发者直接调用
|
RTextViewHelper |
setIconDirection(int iconDirection) |
RTextViewHelper |
setIconHeight(int iconHeight) |
RTextViewHelper |
setIconNormal(android.graphics.drawable.Drawable icon)
Icon
|
RTextViewHelper |
setIconPressed(android.graphics.drawable.Drawable icon) |
RTextViewHelper |
setIconSelected(android.graphics.drawable.Drawable icon) |
RTextViewHelper |
setIconSize(int iconWidth,
int iconHeight) |
RTextViewHelper |
setIconUnable(android.graphics.drawable.Drawable icon) |
RTextViewHelper |
setIconWidth(int iconWidth) |
void |
setSelected(boolean selected)
设置是否选中
备注:用于库内确定逻辑的调用,不建议开发者直接调用
|
protected void |
setTextColor() |
RTextViewHelper |
setTextColor(int normal,
int pressed,
int unable,
int selected) |
RTextViewHelper |
setTextColorNormal(int textColor)
text color
|
RTextViewHelper |
setTextColorPressed(int textColor) |
RTextViewHelper |
setTextColorSelected(int textColor) |
RTextViewHelper |
setTextColorUnable(int textColor) |
RTextViewHelper |
setTypeface(java.lang.String typefacePath)
Typeface
|
dp2px, getBackgroundColorChecked, getBackgroundColorCheckedArray, getBackgroundColorNormal, getBackgroundColorNormalArray, getBackgroundColorPressed, getBackgroundColorPressedArray, getBackgroundColorSelected, getBackgroundColorSelectedArray, getBackgroundColorUnable, getBackgroundColorUnableArray, getBackgroundDrawableChecked, getBackgroundDrawableNormal, getBackgroundDrawablePressed, getBackgroundDrawableSelected, getBackgroundDrawableUnable, getBorderColorChecked, getBorderColorNormal, getBorderColorPressed, getBorderColorSelected, getBorderColorUnable, getBorderDashGap, getBorderDashWidth, getBorderWidthChecked, getBorderWidthNormal, getBorderWidthPressed, getBorderWidthSelected, getBorderWidthUnable, getCornerRadius, getCornerRadiusBottomLeft, getCornerRadiusBottomRight, getCornerRadiusTopLeft, getCornerRadiusTopRight, getGradientCenterX, getGradientCenterY, getGradientRadius, getGradientType, getRippleColor, getRippleMaskDrawable, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, isOutsideView, setBackgroundColorChecked, setBackgroundColorCheckedArray, setBackgroundColorNormal, setBackgroundColorNormalArray, setBackgroundColorPressed, setBackgroundColorPressedArray, setBackgroundColorSelected, setBackgroundColorSelectedArray, setBackgroundColorUnable, setBackgroundColorUnableArray, setBackgroundDrawableChecked, setBackgroundDrawableNormal, setBackgroundDrawablePressed, setBackgroundDrawableSelected, setBackgroundDrawableUnable, setBorderColor, setBorderColorChecked, setBorderColorNormal, setBorderColorPressed, setBorderColorSelected, setBorderColorUnable, setBorderDash, setBorderDashGap, setBorderDashWidth, setBorderWidth, setBorderWidthChecked, setBorderWidthNormal, setBorderWidthPressed, setBorderWidthSelected, setBorderWidthUnable, setCornerRadius, setCornerRadius, setCornerRadiusBottomLeft, setCornerRadiusBottomRight, setCornerRadiusTopLeft, setCornerRadiusTopRight, setGradientCenterX, setGradientCenterY, setGradientOrientation, setGradientRadius, setGradientType, setRippleColor, setRippleMaskDrawable, setShadowColor, setShadowDx, setShadowDy, setShadowRadius, setStateBackgroundColor, setStateBackgroundColor, setStateBackgroundColorArray, setUseRipple, useRipple, useShadowpublic static final int ICON_DIR_LEFT
public static final int ICON_DIR_TOP
public static final int ICON_DIR_RIGHT
public static final int ICON_DIR_BOTTOM
protected int mTextColorNormal
protected int mTextColorPressed
protected int mTextColorUnable
protected int mTextColorSelected
protected android.content.res.ColorStateList mTextColorStateList
protected int[][] states
protected boolean mHasPressedTextColor
protected boolean mHasUnableTextColor
protected boolean mHasSelectedTextColor
protected int mPaddingLeft
protected int mPaddingRight
protected int mPaddingTop
protected int mPaddingBottom
public RTextViewHelper(android.content.Context context,
android.widget.TextView view,
android.util.AttributeSet attrs)
public RTextViewHelper setTypeface(java.lang.String typefacePath)
public java.lang.String getTypefacePath()
public RTextViewHelper setIconNormal(android.graphics.drawable.Drawable icon)
public android.graphics.drawable.Drawable getIconNormal()
public RTextViewHelper setIconPressed(android.graphics.drawable.Drawable icon)
public android.graphics.drawable.Drawable getIconPressed()
public RTextViewHelper setIconUnable(android.graphics.drawable.Drawable icon)
public android.graphics.drawable.Drawable getIconUnable()
public RTextViewHelper setIconSelected(android.graphics.drawable.Drawable icon)
public android.graphics.drawable.Drawable getIconSelected()
public RTextViewHelper setIconSize(int iconWidth, int iconHeight)
public RTextViewHelper setIconWidth(int iconWidth)
public int getIconWidth()
public RTextViewHelper setIconHeight(int iconHeight)
public int getIconHeight()
public RTextViewHelper setIconDirection(int iconDirection)
public int getIconDirection()
protected void setIcon(android.graphics.drawable.Drawable icon)
public RTextViewHelper setTextColorNormal(int textColor)
public int getTextColorNormal()
public RTextViewHelper setTextColorPressed(int textColor)
public int getTextColorPressed()
public RTextViewHelper setTextColorUnable(int textColor)
public int getTextColorUnable()
public RTextViewHelper setTextColorSelected(int textColor)
public int getTextColorSelected()
public RTextViewHelper setTextColor(int normal, int pressed, int unable, int selected)
protected void setTextColor()
public void setEnabled(boolean enabled)
public void setSelected(boolean selected)
public void onTouchEvent(android.view.MotionEvent event)