views:

56

answers:

1

I am using tab navigator. And it has thee tabs "Search", "Show as text", "Show on map"

I have a address search box in Search tab. I would like to hide other two tabs if search has not happened yet. So if user hasn't searched any thing other two tabs shouldn't be visible.

Can you please tell me how can I achieve this?

Hiding tabs is a preferred way. Second option is to disable tabs until search is done.

+1  A: 

There are a couple ways to do this.

  1. Use the TabNavigator's getTabAt() method which returns the Button that makes up the visual tab and set the visible property to false. It can be tricky with bindings.

  2. The other option is to addChildAt or removeChildAt on the TabNavigaor depending on what tabs you want to show or hide.

  3. As you mention disabling could also work. Do this by as well setting the tab's container to disabled.

dlew