diff options
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 8 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 253d27433..fdcbf29b3 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -1,6 +1,8 @@ package de.pixart.messenger.ui; import android.Manifest; +import android.animation.Animator; +import android.animation.AnimatorInflater; import android.annotation.SuppressLint; import android.app.Activity; import android.app.Fragment; @@ -1212,6 +1214,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke return binding.getRoot(); } + @Override + public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) { + int animator = enter ? R.animator.fade_right_in : R.animator.fade_right_out; + return AnimatorInflater.loadAnimator(getActivity(), animator); + } + private void quoteText(String text) { if (binding.textinput.isEnabled()) { text = text.replaceAll("(\n *){2,}", "\n").replaceAll("(^|\n)", "$1> ").replaceAll("\n$", ""); diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java index 63dc9b699..d2f7110f9 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java @@ -29,6 +29,8 @@ package de.pixart.messenger.ui; +import android.animation.Animator; +import android.animation.AnimatorInflater; import android.app.Activity; import android.app.Fragment; import android.content.Intent; @@ -217,6 +219,12 @@ public class ConversationsOverviewFragment extends XmppFragment { } @Override + public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) { + int animator = enter ? R.animator.fade_left_in : R.animator.fade_left_out; + return AnimatorInflater.loadAnimator(getActivity(), animator); + } + + @Override void refresh() { if (this.binding == null || this.activity == null) { Log.d(Config.LOGTAG, "ConversationsOverviewFragment.refresh() skipped updated because view binding or activity was null"); |