title: Android TabWidget detect click on current tab
body: <p>I am trying to find  way to be able to fire an onclick event on a tab when this tab is the current tab.</p>
  
  <p>I did try this way (among several other) with no success thou.</p>
  
  <pre><code>public void onTabChanged(String tabId) {
      Log.d(this.getClass().getName(), "&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; tabId: " + tabId);
  
      int tabs = getTabWidget().getChildCount();
      Log.d(this.getClass().getName(), "tabs: " + tabs);
      for(int i=0; i&lt;tabs; i++){
          View tab = getTabWidget().getChildAt(i);
          if(i==tabHost.getCurrentTab()){
              Log.d(this.getClass().getName(), "tab: " + i);
              tab.setOnClickListener(this);
          }else{
              tab.setOnClickListener(null);
              tab.getOnFocusChangeListener();
          }
      }   
  }
  </code></pre>
  
  <p>the point is that I set the <code>onClickListener</code> to <code>null</code> so, the next time I click on a tab nothing happens, but I would like to have the <em>normal</em> tab behavior.</p>
  
  <p>Any idea there outside?</p>