焦点在日历组件中
我应该怎么做才能关注日历组件中的特定日期?
我这里不是谈论指标。 calendar.setCurrentDate() 和 calendar.setSelectedDate() 获取日期指示符,但焦点始终位于第一个星期日的日期。我在网上看到日历尚未提供此功能。有人知道吗?有什么解决办法吗?
What should I do to focus on the specific date in calendar component?
I am not talking about indicator here. calendar.setCurrentDate() and calendar.setSelectedDate() gets the indicator on the date, but focus is always on date of 1st sunday. I have read on net that this functionality is not provided by calendar yet. Do any one have any idea? Any solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以派生日历并重写
updateButtonDayDate(Button dayButton, int currentMonth, int day)
。当特定日期符合您的要求时,您可以在此处执行
requestFocus()
调用。You can derive calendar and override
updateButtonDayDate(Button dayButton, int currentMonth, int day)
.Here you can perform a
requestFocus()
invocation when the specific date matches your requirement.