tags:

views:

573

answers:

3

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?

+1  A: 

Ok, I solved this problem by using an alternative approach.

I am using FrameLayout within the tabs and changing the view being displayed in the frames. This might not be the best approach as it increases the number of views that are being created that are not visible and not necessary. So if anyone can let me know how to do this in a better way, please let me know. Thank you

achie
A: 

Would you post your layout, please?

HiQuLABS
A: 

Hi Achie post your layout please..

REGARDS Narendar

Sorry Narendar, Its long back that I posted those and do not have those code files anymore.
achie