package com.wbrawner.simplemarkdown.view.activity;

import android.content.Intent;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;

import com.wbrawner.simplemarkdown.R;
import com.wbrawner.simplemarkdown.view.fragment.PreviewFragment;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MarkdownInfoActivity extends AppCompatActivity {

    @BindView(R.id.info_webview)
    WebView infoWebview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_markdown_info);
        ButterKnife.bind(this);
        ActionBar supportActionBar = getSupportActionBar();
        if (supportActionBar != null) {
            supportActionBar.setDisplayHomeAsUpEnabled(true);
        }
        Intent intent = getIntent();
        if (intent == null || !intent.hasExtra("title") || !intent.hasExtra("html")) {
            finish();
            return;
        }
        setTitle(intent.getStringExtra("title"));
        infoWebview.loadDataWithBaseURL(
                null,
                PreviewFragment.style + intent.getStringExtra("html"),
                "text/html",
                "UTF-8",
                null
        );
    }
}

@@ -76,16 +76,42 @@
 Intent;%0A
+import android.os.Bundle;%0A
 import a
@@ -203,33 +203,37 @@
 ort android.
-os.Bundle
+view.MenuItem
 ;%0Aimport and
@@ -1371,10 +1371,257 @@
 ;%0A    %7D%0A
+%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        if (item.getItemId() == android.R.id.home) %7B%0A            onBackPressed();%0A            return true;%0A        %7D%0A        return super.onOptionsItemSelected(item);%0A    %7D%0A
 %7D%0A

Fix up navigation on MarkdownInfoActivity