Skip to content

Commit

Permalink
Merge pull request #1 from garenyondem/master
Browse files Browse the repository at this point in the history
Added Sliding Animation
  • Loading branch information
ophilbert committed Oct 16, 2014
2 parents 6de5bff + ec3b223 commit 7464270
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions res/anim/pull_in_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="220"
android:fromXDelta="-100%"
android:interpolator="@android:anim/decelerate_interpolator"
android:toXDelta="0%" />
6 changes: 6 additions & 0 deletions res/anim/pull_in_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="220"
android:fromXDelta="100%"
android:interpolator="@android:anim/decelerate_interpolator"
android:toXDelta="0%" />
6 changes: 6 additions & 0 deletions res/anim/push_out_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="220"
android:fromXDelta="0%"
android:interpolator="@android:anim/decelerate_interpolator"
android:toXDelta="-100%" />
6 changes: 6 additions & 0 deletions res/anim/push_out_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="220"
android:fromXDelta="0%"
android:interpolator="@android:anim/decelerate_interpolator"
android:toXDelta="100%" />
9 changes: 9 additions & 0 deletions src/animation/ActivityAnimator.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,13 @@ public void unzoomAnimation(Activity a)
{
a.overridePendingTransition(R.anim.unzoom_in, R.anim.unzoom_out);
}

public void PullRightPushLeft(Activity a)
{
a.overridePendingTransition(R.anim.pull_in_right, R.anim.push_out_left);
}
public void PullLeftPushRight(Activity a)
{
a.overridePendingTransition(R.anim.pull_in_left, R.anim.push_out_right);
}
}

0 comments on commit 7464270

Please sign in to comment.