Code example for HorizontalScrollView

Methods: refreshDrawableState, scrollTo

0
        } 
 
        public void onTabChanged(String tabId) {
            int position = mTabHost.getCurrentTab();
            mViewPager.setCurrentItem(position);
            mHorizontalScrollView.scrollTo(position, 0);
            mHorizontalScrollView.refreshDrawableState();
        } 
 
        
        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
        	mHorizontalScrollView.scrollTo(position, 0);
        	mHorizontalScrollView.refreshDrawableState();
        } 
 
       
        public void onPageSelected(int position) {
            // Unfortunately when TabHost changes the current tab, it kindly 
            // also takes care of putting focus on it when not in touch mode. 
            // The jerk. 
            // This hack tries to prevent this from pulling focus out of our