Android监听事件

时间:2022-03-09 14:45:58

ListView事件监听:

setOnItemSelectedListener 鼠标滚动时触发

setOnItemClickListener 点击时触发

EditText事件监听:

setOnKeyListener 获取焦点时触发

RadioGroup事件监听:

setOnCheckedChangeListener 点击时触发

CheckBox事件监听:

setOnCheckedChangeListener 点击时触发

Spinner事件监听:

setOnItemSelectedListener 点击时触发

DatePicker事件监听:

onDateChangedListener 日期改变时触发

DatePickerDialog事件监听:

onDateSetListener 设置日期时触发

TimePicker事件监听:

onTimeChangedListener 时间改变时触发

TimePickerDialog事件监听:

onTimeSetListener 设置时间时触发

Button、ImageButton事件监听:

setOnClickListener 点击时触发

Menu事件监听:

onOptionsItemSelected 点击时触发

Gallery事件监听:

setOnItemClickListener 点击时触发

GridView事件监听:

setOnItemClickListener 点击时触发