Add slide animation for DetailActivity

This commit is contained in:
jacques 2020-10-01 13:38:12 +02:00
parent a38b7cacba
commit 46cc36d202
2 changed files with 3 additions and 0 deletions

View file

@ -57,6 +57,7 @@ public class MedicamentDetailActivity extends AppCompatActivity {
getMedicamentChanges(); getMedicamentChanges();
setResult(1); setResult(1);
finish(); finish();
overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right);
} }
}); });

View file

@ -360,6 +360,7 @@ public class MedicamentListActivity extends AppCompatActivity {
Intent intent = new Intent(context, MedicamentDetailActivity.class); Intent intent = new Intent(context, MedicamentDetailActivity.class);
intent.putExtra("medicament", med); intent.putExtra("medicament", med);
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); 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 intent = new Intent(context, MedicamentDetailActivity.class);
intent.putExtra("medicament", medicamentCourant); intent.putExtra("medicament", medicamentCourant);
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
} }
} }
}); });