Code example for ScrollView

Methods: scrollTo, getHeight

0
		mScrollView.post(new Runnable() {
			public void run() 
			{ 
				if (autoscroll == true)
				{ 
					mScrollView.scrollTo(0,
					  mLines.getBottom() - mScrollView.getHeight());
				} 
			} 
		});    				 
	} 
	 
	@Override 
	public void onCreate(Bundle icicle)
	{ 
	    super.onCreate(icicle);
	    setContentView(R.layout.main);
	 
	    mScrollView = (ScrollView)findViewById(R.id.scrollView);
	    mLines = (LinearLayout)findViewById(R.id.lines);