0

I have a simple android application which reminds me every day via scheduled local notification to drink water. For this purpose, I am using AlarmManager and BroadcastRreceiver. However, by clicking on the notification, an activity of my application starts which displays a message like "Did you drink enough water today?" and two buttons YES/NO. I have also another activity wich displays Calendar View. Depending on what I have chosen I want to mark somehow the current day in my Calendar View, if "YES" in green and if "NO" in red. So later when I run my application to be able to see in which days I drank enough water and in which not. Please check the attached picture to see what I mean.

example

I am not sure if this is possible with Calendar View at all but if not please advise how can I achieve it.

Thank you in advance!

Ivaylo Kisyov
  • 21
  • 1
  • 1
  • 5

2 Answers2

0

After a quick search I found this link on StackOverflow: highlighting specific date in calendar view without onClickListener

While it is not 100% what you are looking for, I think you can turn this into code to highlight the dates that you want. Since this code is for Java you have to do some translation to C# (which basically) adding some capitals. Also, you will need to put it into a custom renderer.

Another route you could take is to look for some custom component which has this functionality out-of-the-box. For instance I see that Telerik has a Calendar control which has some highlighting functionality.

Community
  • 1
  • 1
Gerald Versluis
  • 30,492
  • 6
  • 73
  • 100
0

I've finally found a solution for this without a third-party component. Check this https://github.com/De4th69/CalendarTest

Ivaylo Kisyov
  • 21
  • 1
  • 1
  • 5