Android: How can we change the view in the tabs?

Posted by achie on Stack Overflow See other posts from Stack Overflow or by achie
Published on 2009-12-11T00:39:46Z Indexed on 2010/06/08 5:42 UTC
Read the original article Hit count: 175

Filed under:
|

I want to provide a clickthrough on the list in a tab which opens another view. I need to open the new view within the same tab. I then need to provide a back button on the changed layout to change the view to original view.

I have tried this.

Intent intentA = new Intent(this, AView.class);

Now I am trying to access the tabSpec from main activity class[MainTabView] and set the intent as follows.

MainTabView.tabSpec1.setContent(intentA); MainTabView.mTabHost.setCurrentTab(0);

MainTabView.mTabHost.invalidate();

But this does not change the view immediately but changes it when I go to another tab and come to the starting tab. How can I make it to refresh it as soon as the content has been changed to another intent?

© Stack Overflow or respective owner

Related posts about android

Related posts about tab