这是Java
[code=java]timePicker = (TimePicker) findViewById(R.id.timePicker1);
text=(TextView) findViewById(R.id.textView1);
timePicker.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() {
@Override
public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
// TODO Auto-generated method stub
// Toast.makeText(MainActivity.this, hourOfDay, Toast.LENGTH_LONG).show();
text.setText(hourOfDay);
}[/code]
这是logcat
04-04 17:48:26.787: E/InputEventReceiver(5700): Exception dispatching input event.
看别人帖子这么用没问题啊?