package com.actionbarsherlock.sample.shakespeare.activities;

import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.MenuItem;
import com.actionbarsherlock.sample.shakespeare.fragments.DetailsFragment;

public class DetailsActivity extends FragmentActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
            // If the screen is now in landscape mode, we can show the
            // dialog in-line with the list so we don't need this activity.
            finish();
            return;
        }

        if (savedInstanceState == null) {
            // During initial setup, plug in the details fragment.
            DetailsFragment details = new DetailsFragment();
            details.setArguments(getIntent().getExtras());
            
            getSupportFragmentManager()
            	.beginTransaction()
            	.add(android.R.id.content, details)
            	.commit();
        }
        
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
			case android.R.id.home:
				Intent intent = new Intent(this, TitlesActivity.class);
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(intent);
		}
		
		return super.onOptionsItemSelected(item);
	}
}

@@ -55,16 +55,45 @@
 ities;%0A%0A
+import android.app.Activity;%0A
 import a
@@ -157,16 +157,41 @@
 ration;%0A
+import android.os.Build;%0A
 import a
@@ -1591,58 +1591,438 @@
 ;%0A%09%09
-%7D%0A%09%09%0A%09%09return super.onOptionsItemSelected(item);%0A%09
+%09%09%0A%09%09%09%09//Get rid of the slide-in animation, if possible%0A%09            if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.ECLAIR) %7B%0A%09                OverridePendingTransition.invoke(this);%0A%09            %7D%0A%09%09%7D%0A%09%09%0A%09%09return super.onOptionsItemSelected(item);%0A%09%7D%0A%0A    private static final class OverridePendingTransition %7B%0A        static void invoke(Activity activity) %7B%0A            activity.overridePendingTransition(0, 0);%0A        %7D%0A    
 %7D%0A%7D%0A

Remove forward animation when going back in shakespeare example.