package fr.masciulli.drinks.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.MenuItem;

import fr.masciulli.drinks.R;
import fr.masciulli.drinks.fragment.DrinkDetailFragment;

public class DrinkDetailActivity extends FragmentActivity {

    private DrinkDetailFragment mDetailFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_drink_detail);

        if (savedInstanceState == null) {
            mDetailFragment = new DrinkDetailFragment();
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.drink_detail_container, new DrinkDetailFragment())
                    .commit();
        }

        getActionBar().setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public void finish() {
        super.finish();

        // override transitions to skip the standard window animations
        overridePendingTransition(0, 0);
    }

    @Override
    public void onBackPressed() {
        mDetailFragment.onBackPressed();
    }
}

@@ -720,25 +720,17 @@
 tainer, 
-new Drink
+m
 DetailFr
@@ -735,18 +735,16 @@
 Fragment
-()
 )%0A      

Fix bug at fragment creation