| setOnFocusChangeListener() | ใช้กำหนด การดักฟังเหตุการณ์ เมื่อมีการ focus เปลี่ยนแปลง ที่ Object View |
|---|
method:setOnFocusChangeListener ( View.OnFocusChangeListener l )
return type:void
content:ใช้กำหนด การดักฟังเหตุการณ์ เมื่อมีการ focus เปลี่ยนแปลง ที่ Object View
example:public class AndroidBamboo extends Activity implements View.OnFocusChangeListener { public void onCreate( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); View view = new View ( this ); view.setOnFocusChangeListener( this ); setContentView( view ); } public void onFocusChange ( View v, boolean hasFocus ) { } }