Hi,
I,m trying telrik ui calendar for my app and it's looking good but i get trouble to show event(appointment) indicator on cell.
Here is my code :
<com.telerik.widget.calendar.RadCalendarView
android:id="@+id/calendarView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Here is my activity :
public override View OnCreateView( Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState)
{
var ignored = base.OnCreateView(inflater, container, savedInstanceState);
var view = this.BindingInflate(Resource.Layout.myCalendar, null);
calendarView = view.FindViewById<RadCalendarView>(Resource.Id.calendarView);
calendarView.SelectionMode = CalendarSelectionMode.Single;
EventAdapter appointmnets = new EventAdapter(calendarView);
List<Event> eventsSource = new List<Event>();
// Get event from view model
foreach (var app in this.ViewModel.Events)
{
dates.Add(app.StartDate.Ticks);
Event theEvent = new Event(app.Subject, app.StartDate.Ticks, app.EndDate.Ticks)
{
Title = app.Subject,
StartDate = app.StartDate.Ticks,
EndDate = app.EndDate.Ticks
};
if (theEvent != null)
{
if (theEvent.StartDate <= theEvent.EndDate)
{
eventsSource.Add(theEvent);
}
}
}
}
appointmnets.Events = eventsSource;
calendarView.EventAdapter = appointmnets;
return view;
}
In EventAdapter of calendarView all appointment initialise but no any indicator display on calendar cell. Please help me to solve this.
Thank you.