how to reload Reloading tabs every time
I have to add some开发者_JAVA技巧 tab,or edit the name of the tab to the tab widget.Now i want to reload the tabs every-time when any change in tabs occurs.For this purpose i have made a method and call that each-time when any change in tabs occur.Now my problem is that the method is not working after clearAlltabs() line after second time.First time the same code running properly.. Please Help me..
intentLog = new Intent().setClass(this, ClassName.class);
specLog = tabHost.newTabSpec("Log").setIndicator("Log",
res.getDrawable(R.drawable.list)).setContent(
**intentLog.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)**);
tabHost.addTab(specLog);
you need to add one flag as Intent.FLAG_ACTVITY_CLEAR_TOP serves your purpose.
Please dont forget to mark as an answer if you find it useful..
精彩评论