roomorama / Caldroid

A better calendar for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding Text to events

FajarKhan opened this issue · comments

I am able to show events with different color. Like this:

caldroidFragment.setBackgroundDrawableForDate(blue, Date);

But I also wants to add some text in date or lets say when pressing that date shows name of event in a toast message (or both). Is there anything am i missing? is this library support this?

@FajarKhan have you tried anything ?
I am also looking for same type of customization.

@groomefyvik I have done it by like this:
I have created a Text View below calendar. So whenever user press a date, it will pass that date and show related text in Text View.

Code example if you have trouble to understand:

final CaldroidListener listener = new CaldroidListener() {
            @Override
            public void onSelectDate(Date date, View view) {
             //Get selected date and pass to a function where set Event Text based on that date
             SetEventText(date);
            }
        };
        caldroidFragment.setCaldroidListener(listener);

I really hope they add an event text feature soon!

hi FajarKhan
how can i various event text output in the textview by the clickable dates?

Thankyou

Can you elaborate? I don't quite understand what you meant

hi, sorry,
you have input the SetEventText(date); in the code above onSelectDate.
my answer is how you can show different textviews by the selected dates?
example: 1.1. 2018 event this is an event text
3.2.2018 this is the 2nd event text.
how do you do this with an array or database?
have the code for the function

Thank you very much

and how you have implement the single event in the dates?
i need only one event for a date.