在 DatePickerDialog 侦听器 Android Studio 中更改月份
我正在尝试在 android studio 中实现 datePickerDialog ,我想知道用户何时在月份之间滚动或按下其中一个箭头从一个月份转到另一个月份 ? 无论如何,我可以监听用户按月份分页吗?或者有什么图书馆可以让我这样做吗?
I am trying to implement a datePickerDialog in android studio , and I want to know when the user scrolls between months or presses on one of the arrows to go from one month to another
?
Is there anyway I can listen for users pressing month pagination ? or is there any library that allows me to ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 DatePikerDialog 您可以在文档中看到给出的方法,当单击任何视图时都会调用该方法 onClick(DialogInterfacedialog, intwhich)。
您可以使用此方法来了解用户何时单击月份箭头并处理那里的逻辑。
In the DatePikerDialog you can see in the documentation there is a method given which is called when any view is clicked onClick(DialogInterface dialog, int which).
You can use this method to know when the user clicks the month arrow and handle the logic there.