/reveallayout

Circular reveal animation for even lazier programmers

Primary LanguageKotlinApache License 2.0Apache-2.0

license

This library is no longer maintained.

RevealLayout

Circular reveal animation for even lazier programmers. An extension of ozodrukh's CircularReveal. Built for even lazier programmers.

demo3

Usage

demo1 demo2 demo3

Simple

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();

With path animation

<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();

Activity transition

See example.

Download

repositories {
    maven { url 'https://maven.google.com' }
    jcenter()
    maven { url 'https://jitpack.io' }
}

dependencies {
    compile 'com.hendraanggrian:reveallayout:0.5.3'
}