| setOrientation() | ใช้กำหนดค่า orientation ใหักับ Object LinearLayout |
|---|
method:setOrientation ( int orientation )
return type:void
content:ใช้กำหนดค่า orientation ใหักับ Object LinearLayout ( Orientation คือ การกำหนดว่า ต้องการให้เป็น แนวตั้ง หรือ แนวนอน )
example:public class AndroidBamboo extends Activity { public void onCreate( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); LinearLayout linear_layout = new LinearLayout ( this ); linear_layout.setOrientation ( LinearLayout.VERTICAL ); setContentView( linear_layout ); } }