| setGravity() | ใช้กำหนด ตำแหน่งของข้อความ ภายใน Object TextView |
|---|
method:setGravity ( int gravity )
return type:void
content:ใช้กำหนด ตำแหน่งของข้อความ ภายใน Object TextView
example:public class AndroidBamboo extends Activity { public void onCreate( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); TextView text = new TextView ( this ); text.setText ( "WelCome To BambooLabCode.com" ); text.setGravity ( Gravity.RIGHT ); setContentView ( text ); } }