jignesh13/googlecalendar

Heavily dependant on a single activity

Opened this issue · 0 comments

The customized WeekView and the app the author came up with works great, however I can't say the same thing for readibility.

The code for both view and the app is heavily dependant on a single activity which is 2000+ lines of code as of me writing this making it really difficult to adapt to my use case. I was hoping you could seperate different logical parts of the app in the MainActivity so one could find what they were looking for easily, instead of searching through that big file.

Also the Readme.md explains a "How set event information and minimum and maximum date of calendar", content is outdated and no such method in the explanation exists in the code.
I'm currently using the "day view" on one of my ongoing projects and my use case is completely different, I get date information from a service thus creating my own "custom event" models so adding a custom event looks something like this:

mWeekView.weekViewLoader = object: WeekViewLoader{
            override fun onLoad(periodIndex: Int): MutableList<out WeekViewEvent> {
                return if (periodIndex == 0) {
                    mutableListOf(WeekViewEvent(0, "TEST EVENT", 2021, 8, 2, 20, 0, 2021, 8, 2, 21, 0))
                } else {
                    mutableListOf()
                }
            }
            //...
        }

And oh, one last thing, it would be GREAT if you could convert to Kotlin :)