Questions tagged [calendarview]

CalendarView is a calendar widget for displaying and selecting dates.

CalendarView is a widget for displaying and selecting dates.

Most often it refers to Android's CalendarView. The range of dates supported by it are configurable. The user can select a date by tapping on it, and it's possible to scroll and fling the calendar to a desired date.

375 questions
30
votes
1 answer

Android CalendarView class cannot be found

Im designing the xml format for a calendar to be used in an app, but I cant get the calendar to show in the graphical layout shower. Instead I get the following 'error': The following classes could not be found: - CalendarView (Change to…
EndingWithAli
  • 449
  • 1
  • 5
  • 11
28
votes
5 answers

Android CalendarView for Showing Events

I want to show a calendar with events using different colors on the date similar to default Calendar application. But I don't see any such API on the default calendar view. Can anyone please direct me on right direction how to proceed with this?…
Karthik Andhamil
  • 848
  • 1
  • 13
  • 22
25
votes
2 answers

Custom Android calendarView

I am looking for a CalendarView that can be used in a dialog something like this: I plan to use android.widget.CalendarView but it is available from API level 11. That's an issue considering there are still lot of users, using android 2.3.3 (but…
sankettt
  • 2,387
  • 4
  • 23
  • 31
18
votes
2 answers

Changing the color of selected dates in android's CalendarView widget

How do i change the color of the selected day in the CalendarView widget provided by android. I don't seem to find any way in the documentation. I can change the VerticalBars using setSelectedDateVerticalBar attribute but I want to set a background…
17
votes
6 answers

Android CalendarView slowing down layout

This is driving me crazy. I have a fragment in my Android app which is laid out using a RelativeLayout. Problem is that for some reason it takes ages to render, about 5 seconds just to load about 4 elements on screen. One of the elements is a…
16
votes
2 answers

Lollipop CalenderView DatePicker doesn't call OnDateChanged() method

I'm working with a DatePicker and finding that under Android 5.0 it will not call the OnDateChanged() method in its OnDateChangedListener when it's in CalendarView mode even though a new date has been selected. If android:datePickerMode="spinner" is…
knutsondc
  • 515
  • 4
  • 14
14
votes
1 answer

Is there any way to detect month change in android calendar view(i.e. when user changes calendar to another month)

I want to get month shown in calendar view and i cant figure it out. i tried calendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener() { @Override public void onSelectedDayChange(CalendarView view, int year, int…
Anil Shrestha
  • 1,180
  • 11
  • 16
12
votes
8 answers

Android calendar view

I'm pretty new to Android development and I'm looking for a means of including calendar in my Android application, but I'm striking out pretty bad when googling. Is there any way to use a default calendar kind of view in my application? (would be…
Brian
  • 129
  • 1
  • 1
  • 3
12
votes
2 answers

Changing color of single day in calendarview, android

I've got the calendarview in eclipse and now I'm trying to change the appearance of a single day to highlight dates. I didn't find any useful method here, only changes of appearances of whole weekdates or monthdates. So is there a possibility to…
Werdli
  • 235
  • 1
  • 4
  • 11
11
votes
2 answers

CalendarView not showing days of the month

I'm doing a calendar app and I encountered a strange problem. If I'm not wrong adding a CalendarView to my layout should let me see the days of the month. So I made a new project where the only thing I did was placing the CalendarView on my…
Enroky
  • 121
  • 1
  • 4
11
votes
2 answers

API21 new DatePicker ShowWeekNumber Crash

I was testing my app with the new Android 5.0 (API21) but was getting an error with the CalendarView Caused by: java.lang.UnsupportedOperationException: CalendarView does not exists for the new DatePicker at…
pvalle
  • 1,335
  • 1
  • 13
  • 20
10
votes
1 answer

How to highlight multiple dates in a android CalendarView programmatically

I need to highlight several dates in a CalendaView. that should look like, I tried setDate(), but it didn't work as I want. Please help me to find a solution. Thanks in advance.
Kavin-K
  • 1,948
  • 3
  • 17
  • 48
10
votes
2 answers

CalendarView getDate method returns current date, not selected date... What am I doing wrong?

My calendarView fails to return the selected date, instead returning some default that always points to today. I am of course changing the date selected in my calendar, and it indeed displays as having changed. I tried inspecting the view in debug…
vlad-ardelean
  • 7,480
  • 15
  • 80
  • 124
10
votes
7 answers

How to reduce size of CalendarView?

May I know how to resize the CalendarView in Android? The CalendarView occupied more than half of the screen. I wish to make it smaller, perhaps 40% of the screen. Thanks. Default CalendarView size in my smartphone, occupied more than half My…
CHAN HAU YEEN
  • 343
  • 2
  • 5
  • 18
9
votes
1 answer

Edit background color of a day in calendar view

in my application, I have to show a calendar in which some days are colored differently (eg with a green background) I entered the "calendar view" and I focused on the current date, but can not seem to color certain days from code. Can you give me…
Lele
  • 703
  • 3
  • 15
  • 34
1
2 3
24 25