SHARE
TWEET

Untitled

a guest Mar 7th, 2012 368 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(int t = 0; t < tabHost.getTabWidget().getChildCount(); t++){
  2.         View child = tabHost.getTabWidget().getChildAt(t);
  3.         String tag = (String) child.getTag();
  4.  
  5.         if(tag != null) {
  6.                 if(tag.equals("TAB1")) {
  7.                         child.setOnClickListener(new OnClickListener() {
  8.                                 tabHost.setCurrentTab(0);      
  9.                         }
  10.                 });
  11.         } else if(tag.equals("TAB2")) {
  12.                         child.setOnClickListener(new OnClickListener() {       
  13.                                 tabHost.setCurrentTab(1);
  14.                         }
  15.                 });
  16.         }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top