Get notified when current tab is selected again
<p>I implemented a <code>TabActivity</code> which implements the <code>OnTabChangeListener</code>.
The activity will be notified on tab changes (<code>onTabChanged(String tabId)</code>).</p>

<p>Is it also possible to get notified if the user selects the current tab again? </p>

<p>I would like to use this event to perform a "refresh" of the current tab content instead of providing a refresh button on the tab or in the options menu.</p>

<hr>

<p>That's the way I finally solved the problem - solution hint was in <strong>MisterSquonk</strong> answer.</p>

<p>(1) Define a OnTabReselectListener which must be implemented by an activity which represents a tab content and which will be notified on reselect events.</p>

<pre><code>/**
 * Interface definition for a callback to be invoked when a current selected tab
 * in a TabHost is selected again.
 */
public interface OnTabReselectListener {

    /**
     * Called when a current visible tab is selected again. Will not be invoked
     * on tab changes.
     */
    void onTabReselect();

}
</code></pre>

<p>(2) setOnTouchListener for each tabWidget child in onCreate() of the TabActivity (from MisterSquonk's answer)</p>

<pre><code>for (int i = 0; i &lt; tabWidget.getChildCount(); i++) {
    View v = tabWidget.getChildAt(i);
    v.setOnTouchListener(this);
}
</code></pre>

<p>(3) Implement OnTouchListener.onTouch() in the TabActivity. Do some logic to decide if the current tab was selected again and notifiy the tab's activity.</p>

<pre><code>/**
 * @see android.view.View.OnTouchListener#onTouch(android.view.View,
 *      android.view.MotionEvent)
 */
@Override
public boolean onTouch(View v, MotionEvent event) {
    boolean consumed = false;
    // use getTabHost().getCurrentTabView to decide if the current tab is
    // touched again
    if (event.getAction() == MotionEvent.ACTION_DOWN
            &amp;&amp; v.equals(getTabHost().getCurrentTabView())) {
        // use getTabHost().getCurrentView() to get a handle to the view
        // which is displayed in the tab - and to get this views context
        View currentView = getTabHost().getCurrentView();
        Context currentViewContext = currentView.getContext();
        if (currentViewContext instanceof OnTabReselectListener) {
            OnTabReselectListener listener = (OnTabReselectListener) currentViewContext;
            listener.onTabReselect();
            consumed = true;
        }
    }
    return consumed;
}
</code></pre>
