mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-05 04:19:21 +01:00
Added bounce left/right
This commit is contained in:
@@ -629,15 +629,23 @@ public class FragmentMessages extends FragmentBase {
|
||||
final SwipeListener swipeListener = new SwipeListener(getContext(), new SwipeListener.ISwipeListener() {
|
||||
@Override
|
||||
public boolean onSwipeRight() {
|
||||
if (previous != null)
|
||||
if (previous == null) {
|
||||
Animation shake = AnimationUtils.loadAnimation(getContext(), R.anim.bounce_right);
|
||||
view.startAnimation(shake);
|
||||
} else
|
||||
navigate(previous, true);
|
||||
|
||||
return (previous != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSwipeLeft() {
|
||||
if (next != null)
|
||||
if (next == null) {
|
||||
Animation shake = AnimationUtils.loadAnimation(getContext(), R.anim.bounce_left);
|
||||
view.startAnimation(shake);
|
||||
} else
|
||||
navigate(next, false);
|
||||
|
||||
return (next != null);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user