Monday, 15 February 2010

android - How to restart activity within TabActivity -



android - How to restart activity within TabActivity -

in app have used next code close , restart current activity. problem is, have used 3 tab activity nested. total 9 activities. while using next code app loading slow. think there smarter way this. if knows please suggest me friends.

localactivitymanager manager = getlocalactivitymanager(); string currenttag = tab.getcurrenttabtag(); class<? extends activity> currentclass = manager.getcurrentactivity().getclass(); manager.removeallactivities(); manager.startactivity(currenttag, new intent(mainactivity.this,currentclass));

thank you.

i suppose "smarter" way here not utilize deprecated class tabactivity , sure not nest several tabhost. should utilize fragments , @ to the lowest degree fragmenttabhost.

android

No comments:

Post a Comment