I am building an “Day View” calendar app. I have already created the empty calendar with a List View, and now need to add my appointments.
My cursor is all setup and I am able to retrieve my appointments, just need to draw them on the List View. The tricky part is that each list row is 30 minutes and some of my appointments may go longer, up to several hours. So need to be able to specify where on the List View the appointment should be drawn, even if it’s currently off the screen.
I did the same kind of view. I developed my own CustomView and kept it in a ScrollView. This customView’s height is 24 * 60 dip. So the height of the view will be increased as we kept dip instead of px (I hope you know difference between the px and dip) and the width will be the width of the device screen.
I can’t share you the complete code. But, can partially paste here. This will bring you a clear picture handling every thing.
I think this will help you. Just create Object and pass you appointments in an ArrayList to init of this object and do the tweaks that you need to it.