public class GravitationalClick extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
EFFECT_DEFALT |
A click effect, with given scale and other parameters are set to default
|
static int |
EFFECT_HEAVY |
A Heavy click effect, best click effect for large-sized items
|
static int |
EFFECT_LIGHT |
A Light click effect, best click effect for small-sized items
|
static int |
EFFECT_MIDDLE |
A Medium click effect, best click effect for medium-sized items
|
| 构造器 | 说明 |
|---|---|
GravitationalClick() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static AnimatorProperty |
getActionDownAnimation(Component component,
int type) |
Generates an animator property (scaling effect) for a component, corresponding to an ACTION_DOWN event (that is,
when the user touches the screen).
|
static AnimatorProperty |
getActionDownAnimation(Component component,
int type,
float destScale) |
Generates an animator property (scaling effect) for a component while specifying the scaling percentage,
corresponding to an ACTION_DOWN event (that is, when the user touches the screen).
|
static AnimatorProperty |
getActionUpAnimation(Component component,
int type) |
Generates an animator property for a component, corresponding to an ACTION_UP or ACTION_CANCEL event, so as to
restore the original size of the component (with the scaling percentage being
1F). |
public static final int EFFECT_DEFALT
public static final int EFFECT_HEAVY
public static final int EFFECT_LIGHT
public static final int EFFECT_MIDDLE
public static AnimatorProperty getActionDownAnimation(Component component, int type)
component - Indicates the target component.type - Indicates the scaling (bouncing) effect, which can be EFFECT_HEAVY, EFFECT_MIDDLE,
or EFFECT_LIGHT.AnimatorProperty object.public static AnimatorProperty getActionDownAnimation(Component component, int type, float destScale)
component - Indicates the target component.type - Indicates the scaling (bouncing) effect, which can be EFFECT_HEAVY, EFFECT_MIDDLE,
or EFFECT_LIGHT.destScale - Indicates the scaling percentage, for example, 0.95F (meaning that the component is
scaled to 95% of its original size).AnimatorProperty object.public static AnimatorProperty getActionUpAnimation(Component component, int type)
1F).component - Indicates the target component.type - Indicates the scaling (bouncing) effect, which can be EFFECT_HEAVY, EFFECT_MIDDLE,
or EFFECT_LIGHT.AnimatorProperty object.