| setHint ( resId ) | ใช้กำหนดค่า hint ของ Object TextView ( hint คือ คำอธิบาย ) |
|---|
method:setHint ( int resid )
return type:void
content:ใช้กำหนดค่า hint ของ Object TextView ( hint คือ คำอธิบาย ) โดยเป็นการกำหนดมาจาก resource
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.setHint ( R.string.app_name ); setContentView ( text ); } }