package fr.utc.assos.uvweb.ui.activity;

import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;
import android.widget.TextView;

import fr.utc.assos.uvweb.R;
import fr.utc.assos.uvweb.model.UvListItem;
import fr.utc.assos.uvweb.ui.fragment.UvFragment;

public class UvActivity extends ToolbarActivity {
    public static final String ARG_UV = "arg_uv";

    private TextView nameView;
    private TextView titleView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowTitleEnabled(false);

        UvListItem uv = getIntent().getParcelableExtra(ARG_UV);

        nameView = (TextView) findViewById(R.id.name);
        titleView = (TextView) findViewById(R.id.title);

        nameView.setText(uv.getName());
        titleView.setText(uv.getTitle());

        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.fragment_uv_container, UvFragment.newInstance(uv))
                .commit();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_uv;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            NavUtils.navigateUpFromSameTask(this);
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}

@@ -64,78 +64,8 @@
 le;%0A
-import android.support.v4.app.NavUtils;%0Aimport android.view.MenuItem;%0A
 impo
@@ -1169,275 +1169,7 @@
    %7D
-%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        if (item.getItemId() == android.R.id.home) %7B%0A            NavUtils.navigateUpFromSameTask(this);%0A            return true;%0A        %7D%0A        return super.onOptionsItemSelected(item);%0A    %7D
 %0A%7D%0A

Remove useless code for up navigation