public class XDrawableHelper
extends java.lang.Object
| 构造器和说明 |
|---|
XDrawableHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
static android.content.res.ColorStateList |
colorStateList(int color)
构造 ColorStateList
|
static android.content.res.ColorStateList |
createColorStateList(int normal,
int pressed,
int focused,
int unable)
创建按钮文字点击样式
|
static android.content.res.ColorStateList |
createColorStateList(int normal,
int pressed,
int focused,
int unable,
int select,
int unselect) |
static android.graphics.drawable.StateListDrawable |
createStateListDrawable(android.graphics.drawable.GradientDrawable enableDrawable,
android.graphics.drawable.GradientDrawable pressDrawable,
android.graphics.drawable.GradientDrawable disableDrawable)
获取设置之后的Selector
|
static android.graphics.drawable.StateListDrawable |
createStateListDrawable(android.graphics.drawable.GradientDrawable enableDrawable,
android.graphics.drawable.GradientDrawable pressDrawable,
android.graphics.drawable.GradientDrawable disableDrawable,
android.graphics.drawable.GradientDrawable selectedDrawable,
android.graphics.drawable.GradientDrawable unSelectedDrawable)
获取设置之后的Selector
|
static android.graphics.drawable.GradientDrawable.Orientation |
getOrientation(int orientation)
渐变的方向
|
static android.graphics.drawable.Drawable |
getVectorDrawable(android.content.Context context,
int resVector)
VectorDrawable
|
public static android.graphics.drawable.Drawable getVectorDrawable(android.content.Context context,
int resVector)
public static android.graphics.drawable.StateListDrawable createStateListDrawable(android.graphics.drawable.GradientDrawable enableDrawable,
android.graphics.drawable.GradientDrawable pressDrawable,
android.graphics.drawable.GradientDrawable disableDrawable)
public static android.graphics.drawable.StateListDrawable createStateListDrawable(android.graphics.drawable.GradientDrawable enableDrawable,
android.graphics.drawable.GradientDrawable pressDrawable,
android.graphics.drawable.GradientDrawable disableDrawable,
android.graphics.drawable.GradientDrawable selectedDrawable,
android.graphics.drawable.GradientDrawable unSelectedDrawable)
public static android.content.res.ColorStateList createColorStateList(int normal,
int pressed,
int focused,
int unable)
normal - 正常样式pressed - 按下样式focused - 焦点样式unable - 不可用样式public static android.content.res.ColorStateList createColorStateList(int normal,
int pressed,
int focused,
int unable,
int select,
int unselect)
public static android.graphics.drawable.GradientDrawable.Orientation getOrientation(int orientation)
orientation - public static android.content.res.ColorStateList colorStateList(int color)
color -