开发者

alternative to the missing setOnDateChangeListener()-function

I have a DatePicker-view as well as a TimePicker-view in my layout, and everytime the date or time is changed I want to update a value. On the TimePicker I can simply set a setOnTimeChangedListener, but nothing corresponding exists for the DatePicker. A listener called OnDateChangedListener can be set in the ini开发者_高级运维t()-function, but it does not trigger each time the date is changed. Is there a corresponding listener, or is there a hack available to solve this problem in a satisfactory manner?

http://developer.android.com/intl/de/reference/android/widget/DatePicker.html http://developer.android.com/intl/de/reference/android/widget/TimePicker.html

Cheers,


A listener called OnDateChangedListener can be set in the init()-function, but it does not trigger each time the date is changed.

According to the source code, it is called each time the date is changed. So, try that again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜