public class TuSdkTouchColorChangeListener
extends java.lang.Object
implements android.view.View.OnTouchListener
限定符和类型 | 类和说明 |
---|---|
static class |
TuSdkTouchColorChangeListener.TouchColorType
颜色变化类型
|
构造器和说明 |
---|
TuSdkTouchColorChangeListener(TuSdkTouchColorChangeListener.TouchColorType colorType)
触摸改变颜色
|
限定符和类型 | 方法和说明 |
---|---|
static TuSdkTouchColorChangeListener |
bindTouch(android.view.View view,
TuSdkTouchColorChangeListener.TouchColorType type)
绑定触摸改变视图背景颜色事件
|
static TuSdkTouchColorChangeListener |
bindTouchDark(android.view.View view)
绑定颜色变深事件
|
static TuSdkTouchColorChangeListener |
bindTouchLight(android.view.View view) |
static int |
changeColorFilter(android.graphics.drawable.ColorDrawable drawable,
TuSdkTouchColorChangeListener.TouchColorType colortype,
int defaultColor)
改变背景颜色
|
static void |
changeFilter(android.graphics.drawable.Drawable drawable,
TuSdkTouchColorChangeListener.TouchColorType colortype)
改变图片颜色
|
static void |
clearColorType(android.graphics.drawable.Drawable drawable)
清除颜色设置
|
void |
enabledChanged(android.view.View v,
boolean enabled)
改变状态
|
boolean |
onTouch(android.view.View v,
android.view.MotionEvent event) |
void |
selectedChanged(android.view.View v,
boolean selected)
选中状态
|
static void |
setDark(android.graphics.drawable.Drawable drawable)
设置颜色变深
|
static void |
setLight(android.graphics.drawable.Drawable drawable)
设置颜色变深
|
static TuSdkTouchColorChangeListener |
viewTouchDarkListener()
让控件点击时,颜色变深
|
static TuSdkTouchColorChangeListener |
viewTouchLightListener()
让控件点击时,颜色变亮
|
public TuSdkTouchColorChangeListener(TuSdkTouchColorChangeListener.TouchColorType colorType)
colorType
- 颜色变化类型public static TuSdkTouchColorChangeListener bindTouchDark(android.view.View view)
view
- public static TuSdkTouchColorChangeListener bindTouchLight(android.view.View view)
view
- public static TuSdkTouchColorChangeListener bindTouch(android.view.View view, TuSdkTouchColorChangeListener.TouchColorType type)
view
- 视图type
- 类型public static TuSdkTouchColorChangeListener viewTouchDarkListener()
public static TuSdkTouchColorChangeListener viewTouchLightListener()
public static void setDark(android.graphics.drawable.Drawable drawable)
drawable
- public static void setLight(android.graphics.drawable.Drawable drawable)
drawable
- public static void clearColorType(android.graphics.drawable.Drawable drawable)
drawable
- public static void changeFilter(android.graphics.drawable.Drawable drawable, TuSdkTouchColorChangeListener.TouchColorType colortype)
drawable
- colortype
- 颜色滤镜 设置为空时清除滤镜public static int changeColorFilter(android.graphics.drawable.ColorDrawable drawable, TuSdkTouchColorChangeListener.TouchColorType colortype, int defaultColor)
drawable
- colortype
- defaultColor
- public boolean onTouch(android.view.View v, android.view.MotionEvent event)
onTouch
在接口中 android.view.View.OnTouchListener
public void enabledChanged(android.view.View v, boolean enabled)
v
- enabled
- public void selectedChanged(android.view.View v, boolean selected)
v
- enabled
-