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

Enable week view date header on day view #71

Open pgeyman opened 6 years ago

pgeyman commented 6 years ago

Is it possible to have the week view header (list of dates for the week) on the day view, with clickable headers that change the day view to that date and the currently displayed day highlighted?

jhoobergs commented 6 years ago

@pgeyman That's not possible. But you can easily add a view on top of the weekview that implements this behaviour.

pgeyman commented 6 years ago

ok. Is there a way to turn off the WeekView header if I am going to display my own?

jhoobergs commented 6 years ago

@pgeyman That's currently not possible, but I think it is an easy change. So do you think you can try to fix this ?

You just need to set mHeaderTextHeight to 0 when the option is activated. He will stil show all day events then. You can add the check after https://github.com/Quivr/Android-Week-View/blob/develop/library/src/main/java/com/alamkanak/weekview/WeekView.java#L505

It might be better to just create a private getter for the HeaderTextHeight, that uses the value of the variable when apropriate, and returns 0 if the header shouldn't be shown. And than change the lib to always use that getter instead of the variable

pgeyman commented 6 years ago

@jhoobergs I'm will be away from work for next week, so I will do the change once I'm back