title: How To Show Android Action Bar in WebView
body: <p>How would one go about enabling the ActionBar in a webview.  My current code goes straight to loading the page in a web browser and skips all of my other activity logic, but I'm not sure why.</p>
  
  <p><strong>Main Activity</strong></p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.webview);
  
      ActionBar actionBar = getSupportActionBar();
      actionBar.setTitle("My Page");
      actionBar.setDisplayShowHomeEnabled(false);
  
      WebView myWebView = (WebView) findViewById(R.id.webview);
      myWebView.loadUrl(http://www.google.com);
  }
  </code></pre>
  
  <p><strong>XML File</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
  &lt;WebView
      android:id="@+id/webview"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_marginTop="5dip"
  /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I have also tried creating a dialog to show the webview, but that also proved unsuccessful.
  Thanks!</p>