public void loadTabs(){
  arrButton=new ArrayList<Button>();
  arrTabs=new ArrayList<TabInfo>();
  LinearLayout tabWidget=(LinearLayout)rootView.findViewById(R.id.custom_tabwidget);
  LauncherSQLiteHelper sql=new LauncherSQLiteHelper(mActivity.getApplicationContext());
  List<TabTable> tabTables=sql.getAllTabs();
  for (  TabTable tabEntry : tabTables) {
    TabInfo tab=new TabInfo(tabEntry);
    arrTabs.add(tab);
    Button btn=new Button(mActivity.getApplicationContext());
    btn.setText(tab.getLabel());
    arrButton.add(btn);
    btn.setBackgroundResource(R.drawable.tab_style);
    btn.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT,1));
    btn.setTextColor(Color.WHITE);
    tabWidget.addView(btn);
    TabHost.TabSpec tSpecFragmentId=tHost.newTabSpec(tab.getTag());
    tSpecFragmentId.setIndicator(tab.getLabel());
    tSpecFragmentId.setContent(new DummyTabContent(mActivity.getBaseContext()));
    tHost.addTab(tSpecFragmentId);
  }
}

public void loadTabs ( ) { arrButton = new ArrayList < Button > ( ) ; arrTabs = new ArrayList < TabInfo > ( ) ; LinearLayout tabWidget = ( LinearLayout ) rootView . findViewById ( R . id . custom_tabwidget ) ; LauncherSQLiteHelper sql = new LauncherSQLiteHelper ( mActivity . getApplicationContext ( ) ) ; List < TabTable > tabTables = sql . getAllTabs ( ) ; for ( TabTable tabEntry : tabTables ) { TabInfo tab = new TabInfo ( tabEntry ) ; arrTabs . add ( tab ) ; Button btn = new Button ( mActivity . getApplicationContext ( ) ) ; btn . setText ( tab . getLabel ( ) ) ; arrButton . add ( btn ) ; btn . setBackgroundResource ( R . drawable . tab_style ) ; btn . setLayoutParams ( new LinearLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . MATCH_PARENT , 1 ) ) ; btn . setTextColor ( Color . WHITE ) ; tabWidget . addView ( btn ) ; TabHost . TabSpec tSpecFragmentId = tHost . newTabSpec ( tab . getTag ( ) ) ; tSpecFragmentId . setIndicator ( tab . getLabel ( ) ) ; tSpecFragmentId . setContent ( new DummyTabContent ( mActivity . getBaseContext ( ) ) ) ; tHost . addTab ( tSpecFragmentId ) ; } }
loads all tabs from the database .
