- Code: Select all
private OnClickListener buttonListener = new OnClickListener(){
@Override
public void onClick(View v) {
tabHost.setCurrentTab(Integer.parseInt((String) v.getTag()));
}
};
It is connected to buttons each of which have a tag that equals the number of of tab to be shown. When the button is clicked the first time and this method is called then the tab shows up. I can also see that it executes the code that creates the tab contents.
However, once a tab has been shown once and I have moved to another one, clicking back to it doesn't work. The method is definitely called and the tag is also correct. I put in commands to print to the log to confirm that. Also, it works first time round so must be okay.
Any idea?

