Ok.. I must be overlooking something real simple here, but i think i\'m trying to do something fairly basic.. Simply retain the scrollbar position of a ScrollView on orienta
this code worked for me for dynamically scrolling tabs, maybe it will be useful for u
TabHost tabHost;
int currentActiveTab;
HorizontalScrollView tabsHorizontalScrollView;
//some code ...
tabHost = getTabHost();
tabsHorizontalScrollView = findViewById(R.id.tabsHorizontalScrollView);
currentActiveTab = 8;
//some code ...
tabHost.setCurrentTab(currentActiveTab);
tabHost.getTabWidget().getChildAt(currentActiveTab).post(new Runnable() {
@Override
public void run() {
tabsHorizontalScrollView.scrollTo(tabHost.getTabWidget().getChildAt(currentActiveTab).getLeft(), tabsHorizontalScrollView.getScrollY());
}
});