揭露效果是一个新增动画效果,体验非常不错。很多App都已经开始用起来了。
效果图:
效果图

1
2
3
4
5
6
7
8
9
10
11
12
13
<ImageView
android:id="@+id/rect"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_launcher" />

rect = (ImageView) findViewById(R.id.rect);

Animator animator2 = ViewAnimationUtils.createCircularReveal(rect, 0, 0, 0, (float) Math.hypot(rect.getWidth(), rect.getHeight()));
animator2.setDuration(2000);
animator2.start();