On a button click
, I want to go to an activity
which is not written by me (such as ACTION_DIAL)
and at the same time I want to control it's transition effects
.
I am able to control transition effect
at opening of the activity by using overridePendingTransition
, but I am unable to control the transition effect
when I come back to the same page by pressing the backbutton
.
I want the same effect (android.R.anim.fade_in, android.R.anim.fade_out)
to happen during start and finish of the activity, which is not happening as of now. It's working only at the start.
I am adding the code snippet below. Please have a look and help me out. :)
case R.id.button1:intent = new Intent(Intent.ACTION_DIAL);
startActivity(intent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
break;
case R.id.button2:intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_APP_MESSAGING);
//intent.setType("vnd.android-dir/mms-sms");
startActivity(intent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
break;