Quivr / 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
257 stars 64 forks source link

Input an AllDay event #33

Closed Mluna97 closed 7 years ago

Mluna97 commented 7 years ago

Hello, I have just started with this libs and I would like to input AllDay events like the normal ones, just clicking (the header) one time to make the "add-mark" appear and then once more to confirm the add event. Is that possible? I mean, I want a listener for this:

horas_2

horas

Have someone any idea where can I look for in the code or how to add that listener?

Thanks in advance!

jhoobergs commented 7 years ago

I think you have to make some changes here: https://github.com/Quivr/Android-Week-View/blob/develop/library/src/main/java/com/alamkanak/weekview/WeekView.java#L350

Now it only allows clicks in the bottom view, I think that you can fix it by changing this if and other parts of this method

Mluna97 commented 7 years ago

@jhoobergs Your answer helped me! I changed few ifs and the top variable calculation. Also I added an allDay param in the onEmptyViewClicked method.

Thanks!! :)

jhoobergs commented 7 years ago

@mafra97 If you thinks it works, you may always create a pull request

Mluna97 commented 7 years ago

Yes, I will create a pull request after testing that it has no problems! Thanks!