I am trying to find way to be able to fire an onclick event on a tab when this tab is the current tab.
I did try this way (among several other) with no success thou.
public void onTabChanged(String tabId) {
Log.d(this.getClass().getName(), ">>>>>>>>>>>>>>>>>>>>>>>> tabId: " + tabId);
int tabs = getTabWidget().getChildCount();
Log.d(this.getClass().getName(), "tabs: " + tabs);
for(int i=0; i<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();
}
}
}
the point is that I set the onClickListener
to null
so, the next time I click on a tab nothing happens, but I would like to have the normal tab behavior.
Any idea there outside?