view raw
Alex Sullivan Alex Sullivan - 9 months ago 38
Android Question

Has anyone successfully used setExitTransition on L?

I've been trying to use the new fancy animations that come with the L developer preview, but I'm having a lot of difficulties. In particular, I am not seeing any fancy animations. I'm trying to use the Explode exit transition. Here's the code:

public class ActivityA extends Activity {

protected void onCreate(Bundle savedInstanceState) {
// inside your activity

// set an exit transition
getWindow().setExitTransition(new Explode());

// Find our button and add our click handler
Button button = (Button)findViewById(;
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Transition to activity B
Intent intent = new Intent(ActivityA.this, ActivityB.class);


Solved the problem - you need the


call on the activity you are transitioning too as well!