I've been looking for a while how to try to make a calendar composable, since from what I've seen they haven't currently developed a calendar component like there used to be with XML.
In principle, the idea is to have a calendar that shows a month with all its days, and when clicking on an arrow, it shows the rest of the months, and with a list of days that comes from the service, the corresponding days are marked in one colour, and the current day in another colour.
Related
I'm trying to build a custom datepicker dialog. I used CalendarView instead of DatePicker since I didn't want the header used in DatePicker. This is how it looks now.
And this is what I want to achieve.
The future and previous dates should be visible. If clicked on future month's date, calendar should scroll to next month.
I couldn't find any properties/functions in CalendarView class to achieve this. Is there any other way to achieve this? Is there any 3rd party open-source library that does this?
I am making an attendance app i want to highlight multiple dates where student is absent and also make calendar view not clickable.
only want to show calendar.
This question doesn't look, you have done any research.
However, you can use https://github.com/Applandeo/Material-Calendar-View
Pros:
Easily customizable. [I have used in 3-4 projects so far]
Fits in requirement like range picker, one-day selection (event based)
Lightweight library, few files/ less code. You can also strip off the unnecessary code of range picker and other if you want. As for me, the requirement was only One-day-picker
i want to highlight multiple dates where student is absent
You can create a list of object of EventDay which take the Calendar instance. You can pass it to the CalendarView. It will show the different event aka absentees in your case.
make calendar view not clickable
That's not the big deal, You can easily do that as CalendarView is a custom view itself.
This is my latest screenshot from one of my project. It work really well.
I have to program in Android a calendar that shows a month, that I can slide horizontally to show other months. I tried with the calendarview but it's an infinite scrollable calendar, I need to show a month at once.
One more thing: how can I change the color and the style of a single day in the calendar? For example, to show in which days there are events and in which not.
Thank you very much in advance!
I am sure,I think my question is something different in android.I goggled 100s of sites i saw the date picker in android, all are same type, no one give the different date picker.
My Task is to design custom date picker. Please find this below screen shot.
https://docs.google.com/file/d/0B_c-SDSO63obZzVreHpmdnZBYzg/edit?usp=sharing
For that I goggled, I didn't find any solution. I think, For android solutions this is the best site.
coming to my date picker it is totally dialog box. In that red symbol,name,close mark,submit i can do it. But i want that sun,man,tue,web In red color and on the top month and year. In below dates with green color picker. so Please tell me how can I do that task.
All advices are accepted.
Thanks&Regards
Shankar
Clite
I can only suggest how I would have gone for such a calendar. By the UI it is clear that it has to come as a pop-up or to better say a dialog. Now you have to google the opensource calendars if any or just using the calendar API provided by java you can get the calendar for a month year etc. and move it across previous month by normal java function calls.
Now that you have got the data to populate in your calendar. You have to design a custom layout xml create ~30-40 boxes or a grid with dynamic textviews or a webview with <table>, <tr>, <td> the choice is completely yours.
AFAIK
If you can't find anything opensource then I would suggest you should do these things by the suggested approach.
I am having some UI problems with the DatePicker. Setting dates in my app relies on the day of the week, which the DatePicker lacks without the calendar, so I am using the calendar so the user can see the day of the week. The only problem is, it displays them side to side like this:
Which makes the calendar appear very cramped, especially because this is on a mobile device, so the numbers are very small. Is there a way to make the orientation change, where the slider is on the top and the calendar is on the bottom? The calendar looks much better when it doesn't have the slider next to it as it is bigger, but I need both the slider and calendar.