0

I'm trying to make an activity in a tabHost. I want to be able to press a button in activity A, thats in tab tA and go to tab tB. i've found this solution: Android - Switch Tabs from within an Activity within a tab

but I can't figure out how to find the "indexOfTabToSwitch" How do I get this index?

Community
  • 1
  • 1
dumazy
  • 13,857
  • 12
  • 66
  • 113
  • You will have to give the index with it. If you want to go to tB and it is on the second position.. You will use `indexOfTabToSwitch(1);` – DroidBender Jul 25 '12 at 12:12
  • this didn't seem to work at first, but i think the problem is because i'm using another Thread to process some other data, and when this is done, it should switch the tab – dumazy Jul 25 '12 at 12:19
  • yep, it was the thread problem, tnx – dumazy Jul 25 '12 at 12:35

1 Answers1

0

You will have to give the index with it. If you want to go to tB and it is on the second position.. You will use indexOfTabToSwitch(1);

DroidBender
  • 7,762
  • 4
  • 28
  • 37