1.使用propertyValuesHolder,属性动画多组属性同时改变
- public void propertyValuesHolder(View view)
- {
- PropertyValuesHolder pvhX = PropertyValuesHolder.ofFloat("alpha", 1f,
- 0f, 1f);
- PropertyValuesHolder pvhY = PropertyValuesHolder.ofFloat("scaleX", 1f,
- 0, 1f);
- PropertyValuesHolder pvhZ = PropertyValuesHolder.ofFloat("scaleY", 1f,
- 0, 1f);
- ObjectAnimator.ofPropertyValuesHolder(view, pvhX, pvhY,pvhZ).setDuration(1000).start();
- }
- 2.viewhelper的使用,setbackground和alpha,还有等等的属性能在2.x一下机子运行ViewHelper.setScaleX(view,1f);ViewHelper.setScaleY(view,1f);