1

I use MvxTabsFragmentActivity in my app. I have three tabs. I use button on the tab at number "3". When I click the button you want to switch to the tab number "1". I use this code:

base.OnTabChanged("1");

It is work - content changes, but the selection remains of the title on the "3" tab. enter image description here

How to make that selection of the title changed?

FetFrumos
  • 3,940
  • 3
  • 41
  • 70

1 Answers1

1

I think your problem is that you are calling OnTabChanged directly instead of calling something that actually changes the tab.

There are a couple of approaches you can use to do this. You can get your TabHost and call tabHost.setCurrentTab(1).

Also you could try getActionBar().setSelectedNavigationItem(0);. If you are using the ActionBar (which it looks like you are).

Have you seen this question? It may help solve your problem.

If this answer doesn't help, you should post more of your code (i.e. your full MvxTabsFragmentActivity class) so that I/we can help figure out your specific issue(s).

Good luck!

Community
  • 1
  • 1
ryguy
  • 471
  • 2
  • 7