Force onCreate()

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Force onCreate()

Postby paulspiteri » Fri Jan 30, 2009 4:15 pm

Hi
I've got a solution to my inability to remove tabs from the TabHost...

I rebuild the tabs dynamically in onCreate(), so I remove the tab from the data model so the next time onCreate() rebuilds the tabs (e.g. when the screen rotates) it will not create the tab being removed.

Is there any way I can force the activity to be recreated without waiting for the user to rotate the screen?

Thanks
P :?: :idea: :arrow: :wink: :roll: :twisted: :evil: :P :oops: 8) :?
paulspiteri
Freshman
Freshman
 
Posts: 8
Joined: Mon Jan 26, 2009 3:15 pm

Top

Postby MrSnowflake » Sat Jan 31, 2009 8:53 am

Instead of doing the initialisation in the onCreate(), make a new method and call that one from the onCreate().
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby paulspiteri » Sat Jan 31, 2009 2:02 pm

hi
i think i didn't do that because clearAllTabs() doesn't work properly, so i'm never in a position to rebuild all the open tabs unless i'm totally recreating the activity.
paulspiteri
Freshman
Freshman
 
Posts: 8
Joined: Mon Jan 26, 2009 3:15 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google Feedfetcher and 6 guests