method:getOrientation ( )
return type:int
content:ใช้คืนค่า orientation ของ Object LinearLayout
โดยค่าที่เป็นไปได้ ได้แก่ ค่าคงที่ LinearLayout.HORIZONTAL และ LinearLayout.VERTICAL
( Orientation คือ การกำหนดว่า ต้องการให้เป็น แนวตั้ง หรือ แนวนอน )
example:public class AndroidBamboo extends Activity
{
public void onCreate( Bundle savedInstanceState )
{
super.onCreate ( savedInstanceState );
LinearLayout linear_layout = new LinearLayout ( this );
int orientation = linear_layout.getOrientation ( );
setContentView( linear_layout );
}
}