| setError() | ใช้กำหนดค่า ข้อความแสดงความผิดพลาด ของ Object TextView |
|---|
method:setError ( CharSequence error )
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.setError ( "Please Input Number Only !!" ); String alert_message = text.getError ( ); setContentView ( text ); } }