From 46cc36d202257f161f3ae24b294d0e0a6f9ca6e5 Mon Sep 17 00:00:00 2001 From: jacques Date: Thu, 1 Oct 2020 13:38:12 +0200 Subject: [PATCH] Add slide animation for DetailActivity --- .../java/net/foucry/pilldroid/MedicamentDetailActivity.java | 1 + .../main/java/net/foucry/pilldroid/MedicamentListActivity.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java index a2b1794..c4e40ac 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java @@ -57,6 +57,7 @@ public class MedicamentDetailActivity extends AppCompatActivity { getMedicamentChanges(); setResult(1); finish(); + overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right); } }); diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java index e290384..fcfc252 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java @@ -360,6 +360,7 @@ public class MedicamentListActivity extends AppCompatActivity { Intent intent = new Intent(context, MedicamentDetailActivity.class); intent.putExtra("medicament", med); startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); + overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left); } /** @@ -511,6 +512,7 @@ public class MedicamentListActivity extends AppCompatActivity { Intent intent = new Intent(context, MedicamentDetailActivity.class); intent.putExtra("medicament", medicamentCourant); startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); + overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left); } } });