I have been trying to implement calendar view with showing events for dates as shown in following image:(Events shown as green dots below image)
I have looked for android calendar view but found that its not supported with that as it is just a widget.
Then I got to know that there are various plugins to implements such functionality. So question is which one is good for my aim?
Related
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.
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 created a view that has CalendarView added programatically.
Code:
CalendarView calendarView = new CalendarView(context);
calendarView.setDate(new Date().getTime());
cardInner.addView(calendarView);
http://www.screencast.com/t/ugGKqI2V0EH
The current set up is the one on the screenshot. I was wondering if there is a way to make it look this way?
http://screencast.com/t/Q1kwyib0hOv
This is not possible using the CalendarView widget from AOSP. See https://developer.android.com/reference/android/widget/CalendarView.html
It is however possible to prevent the user from picking any date other than a date inside a certain week. You can achieve this by using the setMinDate and setMaxDate methods: https://developer.android.com/reference/android/widget/CalendarView.html#setMaxDate(long)
A third option would be extending the CalendarView widget and altering the onDraw method to only draw one row.
Also, try and search around on google. There might be a 3rd party library that can already do this.
i want to create a view just like image. How can i accomplish this.I have seach about this but not able to create just like this view. Can any body help me.
I have create the calender but the unable to show the bars
Thanks
You can use Yadview library from this link : https://code.google.com/p/yadview
It loads, lays out and displays events. yadview is intended to be more robust in handling of events from various sources, rendering differently.
It works really good for me!
there is a library that you can use:
https://github.com/roomorama/Caldroid
Embedded as a fragment or shown as dialog
Set min/max date. The date outside min/max range is marked as disabled
Set disabled dates
Select dates fromDate to toDate
Client can listen to various events when user interacts with Calendar
Customize look and feel
I have created a GridView to manage a Calendar application. The idea is that the user will be able to add text and images to specific days, and view events in the grid.
Are there any calendar libraries or built-in classes that I could use instead of GridView, or does anyone have experience using a GridView specifically for this (or a similar) purpose?
Answers with code would be very appreciated.
Instead of creating your own grid and attempting to build this calendar from scratch, Android 3.0 (API 11) has a built in Calendar View. On the dev page, this view is described as follows:
This class is a calendar widget for displaying and selecting dates.
The range of dates supported by this calendar is configurable. A user
can select a date by taping on it and can scroll and fling the
calendar to a desired date.
Although you cannot type directly in this View, you can allow the user to select the date, and using the selected date open a new Activity that lets him or her add text using an EditText, or choose a photo.