this lib brings android circularreveal activity transition on android4.0+
first of all,you must disable system default activity transition by overridePendingTransition(0, 0) or other method;
- add to your app build.gradle
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
...
compile 'andy.ayaseruri.circularrevealactivity:lib:1.0.0'
compile 'com.github.ozodrukh:CircularReveal:1.1.1'
}
<groupId>andy.ayaseruri.circularrevealactivity</groupId>
<artifactId>lib</artifactId>
<version>1.0.0</version>
-
the activity that you want to open with circularreveal effect must extends the CircularRevealActivity and you must use setContentView(View yourView) or setContentView(int yourLayoutId) to set your activity's layout;
-
the activity's theme that you want to open with circularreveal effect must have the following tags:
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsTranslucent">true</item>
-
you may use setStartPoint(int x, int y) in CircularRevealActivity,this method must be called before setContentView method;
-
you can also use intent like:
Intent intent = new Intent(MainActivity.this, MyCircularRevealActivity.class);
intent.putExtra("start_point", int[2] clickPoint);
startActivity(intent);
overridePendingTransition(0, 0);
you can use setCircularRevealDuration() to set duration.