public class RBaseHelper<T extends android.view.View>
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
BG_TYPE_COLOR
背景类型{1:单一颜色值 2:颜色数组 3:图片}
|
protected int |
BG_TYPE_COLOR_ARRAY
背景类型{1:单一颜色值 2:颜色数组 3:图片}
|
protected int |
BG_TYPE_IMG
背景类型{1:单一颜色值 2:颜色数组 3:图片}
|
protected android.content.Context |
mContext |
protected T |
mView |
| 构造器和说明 |
|---|
RBaseHelper(android.content.Context context,
T view,
android.util.AttributeSet attrs) |
protected int BG_TYPE_COLOR
protected int BG_TYPE_COLOR_ARRAY
protected int BG_TYPE_IMG
protected android.content.Context mContext
protected T extends android.view.View mView
public RBaseHelper(android.content.Context context,
T view,
android.util.AttributeSet attrs)
public float getGradientRadius()
public float getGradientCenterX()
public float getGradientCenterY()
public int getGradientType()
public RBaseHelper setGradientRadius(float gradientRadius)
public RBaseHelper setGradientCenterX(float gradientCenterX)
public RBaseHelper setGradientCenterY(float gradientCenterY)
public RBaseHelper setGradientType(int gradientType)
gradientType - {LINEAR_GRADIENT=0, RADIAL_GRADIENT=1, SWEEP_GRADIENT=2}public RBaseHelper setGradientOrientation(android.graphics.drawable.GradientDrawable.Orientation orientation)
public RBaseHelper setStateBackgroundColor(int normal, int pressed, int unable, int checked, int selected)
public RBaseHelper setStateBackgroundColorArray(int[] normalArray, int[] pressedArray, int[] unableArray, int[] checkedArray, int[] selectedArray)
public RBaseHelper setStateBackgroundColor(android.graphics.drawable.Drawable normal, android.graphics.drawable.Drawable pressed, android.graphics.drawable.Drawable unable, android.graphics.drawable.Drawable checked, android.graphics.drawable.Drawable selected)
public int getBackgroundColorNormal()
public int getBackgroundColorPressed()
public int getBackgroundColorUnable()
public int getBackgroundColorChecked()
public int getBackgroundColorSelected()
public int[] getBackgroundColorNormalArray()
public int[] getBackgroundColorPressedArray()
public int[] getBackgroundColorUnableArray()
public int[] getBackgroundColorCheckedArray()
public int[] getBackgroundColorSelectedArray()
public android.graphics.drawable.Drawable getBackgroundDrawableNormal()
public android.graphics.drawable.Drawable getBackgroundDrawablePressed()
public android.graphics.drawable.Drawable getBackgroundDrawableUnable()
public android.graphics.drawable.Drawable getBackgroundDrawableChecked()
public android.graphics.drawable.Drawable getBackgroundDrawableSelected()
public RBaseHelper setBackgroundColorNormal(int colorNormal)
public RBaseHelper setBackgroundColorNormalArray(int[] colorNormalArray)
public RBaseHelper setBackgroundDrawableNormal(android.graphics.drawable.Drawable drawableNormal)
public RBaseHelper setBackgroundColorPressed(int colorPressed)
public RBaseHelper setBackgroundColorPressedArray(int[] colorPressedArray)
public RBaseHelper setBackgroundDrawablePressed(android.graphics.drawable.Drawable drawablePressed)
public RBaseHelper setBackgroundColorUnable(int colorUnable)
public RBaseHelper setBackgroundDrawableUnable(android.graphics.drawable.Drawable drawableUnable)
public RBaseHelper setBackgroundColorUnableArray(int[] colorUnableArray)
public RBaseHelper setBackgroundColorChecked(int colorChecked)
public RBaseHelper setBackgroundColorSelected(int colorSelected)
public RBaseHelper setBackgroundColorCheckedArray(int[] colorCheckedArray)
public RBaseHelper setBackgroundColorSelectedArray(int[] colorSelectedArray)
public RBaseHelper setBackgroundDrawableChecked(android.graphics.drawable.Drawable drawableChecked)
public RBaseHelper setBackgroundDrawableSelected(android.graphics.drawable.Drawable drawableSelected)
public boolean useShadow()
public RBaseHelper setShadowRadius(int shadowRadius)
public int getShadowRadius()
public RBaseHelper setShadowColor(int shadowColor)
public int getShadowColor()
public RBaseHelper setShadowDx(int shadowDx)
public int getShadowDx()
public RBaseHelper setShadowDy(int shadowDy)
public int getShadowDy()
public RBaseHelper setUseRipple(boolean useRipple)
public boolean useRipple()
public RBaseHelper setRippleColor(int rippleColor)
public int getRippleColor()
public RBaseHelper setRippleMaskDrawable(android.graphics.drawable.Drawable rippleMaskDrawable)
public android.graphics.drawable.Drawable getRippleMaskDrawable()
public RBaseHelper setBorderWidthNormal(int width)
public int getBorderWidthNormal()
public RBaseHelper setBorderColorNormal(int color)
public int getBorderColorNormal()
public RBaseHelper setBorderWidthPressed(int width)
public int getBorderWidthPressed()
public RBaseHelper setBorderColorPressed(int color)
public int getBorderColorPressed()
public RBaseHelper setBorderColorChecked(int color)
public int getBorderColorChecked()
public RBaseHelper setBorderColorSelected(int color)
public int getBorderColorSelected()
public RBaseHelper setBorderWidthChecked(int width)
public int getBorderWidthChecked()
public RBaseHelper setBorderWidthSelected(int width)
public int getBorderWidthSelected()
public RBaseHelper setBorderWidthUnable(int width)
public int getBorderWidthUnable()
public RBaseHelper setBorderColorUnable(int color)
public int getBorderColorUnable()
public RBaseHelper setBorderWidth(int normal, int pressed, int unable, int checked, int selected)
public RBaseHelper setBorderColor(int normal, int pressed, int unable, int checked, int selected)
public RBaseHelper setBorderDashWidth(float dashWidth)
public float getBorderDashWidth()
public RBaseHelper setBorderDashGap(float dashGap)
public float getBorderDashGap()
public RBaseHelper setBorderDash(float dashWidth, float dashGap)
public void setCornerRadius(float radius)
public float getCornerRadius()
public RBaseHelper setCornerRadiusTopLeft(float topLeft)
public float getCornerRadiusTopLeft()
public RBaseHelper setCornerRadiusTopRight(float topRight)
public float getCornerRadiusTopRight()
public RBaseHelper setCornerRadiusBottomRight(float bottomRight)
public float getCornerRadiusBottomRight()
public RBaseHelper setCornerRadiusBottomLeft(float bottomLeft)
public float getCornerRadiusBottomLeft()
public RBaseHelper setCornerRadius(float topLeft, float topRight, float bottomRight, float bottomLeft)
protected boolean isOutsideView(int x,
int y)
x - y - protected float dp2px(int dp)
dp - dp