こんにちはAndroid code ..(エクレアコード)のUIでタブを無効にする方法を教えてください。
TabHostを拡張し、メソッドをオーバーライドします。
@Override
public void setCurrentTab(int currentTab) {
if (currentTab != 2) // position of the tab that should not get selected
super.setCurrentTab(currentTab);
else
// in my case I want to trigger something here but I don't want the button to get selected
}
@Override
public void setCurrentTabByTag(String tag) {
if (!"\"plus_tab\"".equals(tag)) // tag of the tab that should not get selected
super.setCurrentTabByTag(tag);
else
// in my case I want to trigger something here but I don't want the button to get selected
}