Может быть overridePendingTransition поможет?
Intent newActivity = new Intent(getApplicationContext(), activity.class);
startActivity(newActivity);
this.overridePendingTransition(R.anim.swipe_left_enter, R.anim.swipe_left_exit);
, и анимирование может быть примерно таким:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:fromXScale="0.0"
android:fromYScale="1.0"
android:pivotX="100%"
android:pivotY="50%"
android:toXScale="1.0"
android:toYScale="1.0"
android:duration="100"
android:fillAfter="true"/>
</set>
Это пример, но может бытьтакже используется как анимирующее затухание.
PS Я забыл упомянуть, что вы должны реализовать
class MyGestureListener extends GestureDetector.SimpleOnGestureListener {
@Override
public boolean onFling(MotionEvent event1, MotionEvent event2,
float velocityX, float velocityY) {
// your code here
}
}
onFling