-1

hey guys currently i have TabHost implemented with 3 tabs each containing separate activity.

Each activity has Spinner view. I want to do Tab switching automatically i.e. when I select

first spinner then next tab should get called automatically. How can I do this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • See this link http://stackoverflow.com/questions/2541802/android-switch-tabs-from-within-an-activity-within-a-tab – Tim May 07 '13 at 15:38

1 Answers1

1

use TabHost.setCurrentTab method. remember that the tab index starts from 0. for example to switch to the second tab use

getTabHost().setCurrentTab(1);
stinepike
  • 54,068
  • 14
  • 92
  • 112