[英]How to display a simple monthly calendar
I am building an Android app and I need to show a very simple monthly calendar (with next and previous month links). 我正在构建一个Android应用,我需要显示一个非常简单的月历(带有下个月和上个月的链接)。 And, if possible, display events on some days. 并且,如果可能,显示几天的事件。
I have search, high and low, for a solution but found nothing. 我一直在寻找解决方案,但没有找到任何解决方法。 Isn´t there a very simple way of doing this? 有没有非常简单的方法来做到这一点? All the widgets I find got too much features. 我发现的所有小部件都有太多功能。
Check out this library: https://github.com/derekbrameyer/android-betterpickers 看看这个库: https : //github.com/derekbrameyer/android-betterpickers
I currently use it to show a monthly calendar. 我目前使用它来显示每月日历。 it looks good, clean and is extremely easy to implement in an application. 它看起来不错,干净而且非常容易在应用程序中实现。
I am not sure if this helps but maybe consider using a DatePickerDialog
and put it into a DialogFragment
, while making sure to use the CalendarView
... all of which is native to the Android SDK so it's a piece of cake to implement. 我不确定这是否有帮助,但也许可以考虑使用DatePickerDialog
并将其放入DialogFragment
,同时确保使用CalendarView
...所有这些都是Android SDK固有的,因此实现起来很容易。
Also I have heard of a GitHub Library available called DateTimePicker, you can find more information here https://github.com/tarruda/bootstrap-datetimepicker ... it might be a little harder to configure for your exact needs but it's probably worth a look. 我也听说过有一个名为DateTimePicker的GitHub库,您可以在这里找到更多信息https://github.com/tarruda/bootstrap-datetimepicker ...为满足您的确切需求可能会更难配置,但可能值得看看。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.