Q:

Override Activity animation in code

I want to override my default Activity animation, I know this can be done in xml.
But its important that its done by code, Because the position where it should be animated to is relative.
I tried to create a method but it did not work.
Can someone explain to me why I cant do overridePendingTransition(slideLeft, slideRight);
the slideLeft and slideRight are animation defined in code.
Thanks                      

A:

Final conclusion, It Cant be done in code.

