Circular reveal animation for even lazier programmers. An extension of ozodrukh's CircularReveal. Built for even lazier programmers.
Simply add target reveal id attribute in RevealFrameLayout
or RevealLinearLayout
.
<com.hendraanggrian.reveallayout.RevealFrameLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:revealId="@+id/target"
app:revealDuration="500">
<View
android:id="@id/target"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.hendraanggrian.reveallayout.RevealFrameLayout>
This animation can also be triggered programmatically.
RevealFrameLayout layout = (RevealFrameLayout) findById(R.id.layout);
View target = findById(R.id.target);
Animator animator = layout.reveal(target);
animator.setDuration(500);
animator.start();
<com.hendraanggrian.reveallayout.RevealFrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/source"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<View
android:id="@+id/target"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.hendraanggrian.reveallayout.RevealFrameLayout>
RevealFrameLayout layout = (RevealFrameLayout) findById(R.id.layout);
View source = findById(R.id.source);
View target = findById(R.id.target);
AnimatorSet set = layout.revealTo(source, target);
set.start();
See example.
repositories {
maven { url 'https://maven.google.com' }
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
compile 'com.hendraanggrian:reveallayout:0.5.3'
}