在最低SDK版本14应用程序中,如何在
Android中完成与此相同的效果?
>背景效果
>滑动切换按钮
>我的minSDKVersion是14
看起来像是在背景上放大动画的圆圈,还是有更具体的功能呢?
非常感谢…
解决方法
看看
Circular Reveal from touch point:
@Override public boolean onTouch(View view,MotionEvent motionEvent) { if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { if (view.getId() == R.id.square_yellow) { revealFromCoordinates(motionEvent.getRawX(),motionEvent.getRawY()); } } return false; } private Animator animateRevealColorFromCoordinates(int x,int y) { float finalRadius = (float) Math.hypot(viewRoot.getWidth(),viewRoot.getHeight()); Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot,x,y,finalRadius); viewRoot.setBackgroundColor(color); anim.start(); }