在最低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(); }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。