title: How place WebView in Tab with Action Bar Android
body: <p>I need help with this code, i need add the webview code but he can't run, i try change the main activity and the fragmenttab1 but nothing.</p>
  
  <p>I use the action bar and this is difficult for me, because i'm new with this method.</p>
  
  <p>Any know how?</p>
  
  <p>The code of my <strong>main activity</strong> is this:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      //Obtenemos una referencia a la actionbar
      ActionBar abar = getActionBar();
  
          //Establecemos el modo de navegación por pestañas
      abar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
  
      //Ocultamos el título de la actividad
      //abar.setDisplayShowTitleEnabled(false);
  
      //Creamos las pestañas
      ActionBar.Tab tab1 = abar.newTab().setText("Tab1");
          ActionBar.Tab tab2 = abar.newTab().setText("Map");
  
          //Creamos los fragments de cada pestaña
          Fragment tab1frag = new Tab1Fragment();
          Fragment tab2frag = new Tab2Fragment();
  
          //Asociamos los listener a las pestañas
          tab1.setTabListener(new MiTabListener(tab1frag));
          tab2.setTabListener(new MiTabListener(tab2frag));
  
          //Añadimos las pestañas a la action bar
          abar.addTab(tab1);
          abar.addTab(tab2);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.activity_main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
          case R.id.menu_new:
              Log.i("ActionBar", "New!");
              return true;
          case R.id.menu_save:
              Log.i("ActionBar", "Save!");;
              return true;
          case R.id.menu_settings:
              Log.i("ActionBar", "Settings!");;
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }}
  </code></pre>
  
  <p>The code of my <strong>TabFragment1</strong> is this:</p>
  
  <pre><code>public class Tab1Fragment extends Fragment {
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
      return inflater.inflate(R.layout.fragment1, container, false);
  }}
  </code></pre>
  
  <p>Please help me!!!</p>