Code example for HorizontalScrollView

Methods: scrollTo

0
         mTabHost.setCurrentTab(position);
         //this.mTabHost.setCurrentTab(position); 
         final HorizontalScrollView hScrollView = (HorizontalScrollView)findViewById(R.id.scroller);
         hScrollView.post(new Runnable() {
        	 @Override     public void run() {          
        		 hScrollView.scrollTo(positionXY*position-100, 0);     
        		 }   
        	 });  
          
          
         Log.e("position","position:"+position);
         Log.e("position","current:"+mTabHost.getCurrentTab());
          
    } 
     
    private Drawable resize(Drawable image) {
    	Bitmap d = ((BitmapDrawable)image).getBitmap();
    	Bitmap bitmapOrig = Bitmap.createScaledBitmap(d, 100, 100, false);
    	return new BitmapDrawable(bitmapOrig); 
    }