OnClickListener on Tabs not working

后端 未结 4 1268
孤独总比滥情好
孤独总比滥情好 2020-12-05 09:19

Greetings,

I am trying to get the Click - event when clicking on the currently selected tab of my TabActivity. The onTabChangedHandler is only called whenever the ta

4条回答
  •  攒了一身酷
    2020-12-05 09:23

    Your clause is wrong, use:

    ...

    if (getTabHost().getCurrentTabTag().equals(myTabTag) == false) {
                getTabHost().setCurrentTab(myTabIndex );
       }
    

    ...

提交回复
热议问题