title: Creating Tab Bar using fragments from support package
body: <p>Hello I am searching a good example creating my custom Tab Bar (at the bottom) using fragments. </p>
  
  <p>Earlier I had written this using Activities Groups, but from android 3.* it's deprecated and I need to do this using fragments.</p>
  
  <p>Here is the code I had written creating my custom Tab Bar: </p>
  
  <pre><code>private void setTabs()
  {
  
      //Implementing strings
      String publication = String.format("First");
      String shop = String.format("Second");
  
      //Adding tabs to TabActivity
      //addTab(publication, R.drawable.ic_launcher, DisplayTestActivity.class);
     //addTab(shop, R.drawable.ic_launcher, DisplayPushedTestActivity.class);
  
  
  
  }
  
  
  @Override
  public void onTabChanged(String tabId) {
      // TODO Auto-generated method stub
  
  }
  
  /**
   * 
   * @param labelId, tab name
   * @param drawableId, tab icon image
   * @param c, responsible class
   */
  /*
  private void addTab(String labelId, int drawableId, Class&lt;?&gt; c)
  {
      TabHost tabHost = getTabHost();  // The activity TabHost
  
      Intent intent = new Intent(this, c);
  
      TabHost.TabSpec spec = tabHost.newTabSpec("tab" + labelId); 
  
  
      View tabIndicator = LayoutInflater.from(this).inflate(R.layout.tab_indicator, getTabWidget(), false);
  
      System.out.println(tabIndicator);
  
      TextView title = (TextView) tabIndicator.findViewById(R.id.tab_bar_title);
  
      System.out.println(labelId);
      System.out.println(title);
      title.setText(labelId);
      ImageView icon = (ImageView) tabIndicator.findViewById(R.id.tab_bar_icon);
      icon.setImageResource(drawableId);
  
      spec.setIndicator(tabIndicator);
      spec.setContent(intent);
      tabHost.addTab(spec);
  }
  </code></pre>
  
  <p>Maybe someone could share some info about this.</p>
  
  <p>Thanks.</p>