alamkanak / Android-Week-View

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Apache License 2.0
3.42k stars 1.23k forks source link

How to make event text not repeated? #516

Open majdalden opened 6 years ago

majdalden commented 6 years ago

How do I make the event text not repeated with that text only one word ???

https://image.ibb.co/gg6HrU/Screen_Shot_2018_08_11_at_12_15_14_AM.png

ghost commented 5 years ago

i have the same issue

manu8170 commented 5 years ago

The same for me

manu8170 commented 5 years ago

Update: I found the problem and it was in my code. More precisely on my MonthLoader.MonthChangeListener. WeekView.getMoreEvents gets the events for 3 months (the current + the previous + the next). My MonthChangeListener was too simple (I built an app for a test only) and didn't check my single event (starting at current time - 2 hours and ending at current time + 2 days) was in the newMonth passed as a parameter to MonthChangeListener.onMonthChange. The same event was returned for the previous, current and next month. So there were 3 distinct events in fact with the same title and the same rendering color, giving the illusion there was only one task with a title repeated 3 times. Hope it helps.

josephvijayandroiddev commented 4 years ago

hey guys just use evenmatches method if (eventMatches(event, newYear, newMonth)) { events.add(event); } you will get that method from example file in this source code. file name asycnoractivity.java