| scrollTo() | ใช้กำหนดให้ scrollbar เลื่อนไปยังตำแหน่งที่กำหนด |
|---|
method:scrollTo ( int x, int y )
return type:void
content:ใช้กำหนดให้ scrollbar เลื่อนไปยังตำแหน่งที่กำหนด
example:public class AndroidBamboo extends Activity { public void onCreate( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); HorizontalScrollView scroll_view = new HorizontalScrollView ( this ); Button button = new Button ( this ); button.setText ( "InTo BambooLabCode" ); scroll_view.addView ( button ); scroll_view.scrollTo ( 0, 0 ); setContentView( scroll_view ); } }