0

I'm trying to do a simple slide-in-left/slide-out-right animation for my dialog fragments. My fragments extend SherlockDialogFragment and I set the animation in onCreateDialog:

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog dialog = super.onCreateDialog(savedInstanceState);
    dialog.getWindow().getAttributes().windowAnimations = R.style.dialog_animation;
    return dialog;
}

Problem is that the animation doesn't work phones with API <= 15. What am I missing here? Thanks.

Liuting
  • 1,098
  • 17
  • 35
dnldd
  • 113
  • 1
  • 8

1 Answers1

2

There was nothing wrong with my code apparently. My test device had animation turned off. I just had to turn it back on, everything worked just fine after that was done.

dnldd
  • 113
  • 1
  • 8