Code example for HorizontalScrollView

Methods: scrollTo

0
		widget.setDescendantFocusability(oldFocusability);
		if (mHorizontalScrollV != null) {
			final int width = widget.getMeasuredWidth();
//			final float oneTabWidth = ((float)width)/mTabs.size(); 
			float scrollOffset = (float)position * ((float)width - (float)mScreenWidth)/((float)mTabs.size() - 1.0F);
			mHorizontalScrollV.scrollTo((int)scrollOffset, 0);
		} 
	} 
 
	@Override 
	public void onTabChanged(String tabId) {
		int position = mTabHost.getCurrentTab();
		mViewPager.setCurrentItem(position);
	} 
 
	@Override 
	public boolean isViewFromObject(View view, Object object) {
		return view == object;
	} 
	 
//	/**