roomorama / Caldroid

A better calendar for Android
Other
1.42k stars 531 forks source link

Calendar height bug #376

Open Maragues opened 8 years ago

Maragues commented 8 years ago

Calendar exact height was calculated without taking into account the GridView attribute verticalSpacing, which resulted in rowHeight value being smaller than it should be. Then, we tried to fit a number of rows (5) in too little space, which resulted in the calendar being wrapped in a scroll.

See http://developer.android.com/intl/es/reference/android/widget/GridView.html#attr_android:verticalSpacing

grennis commented 8 years ago

Hi Maragues, I did not know there was already an open pull request for this and I submitted a separate fix (https://github.com/roomorama/Caldroid/pull/419). But I think your fix isn't quite right, since the vertical spacing is only applied between rows, so it shouldn't added to the rowheight - it should be height += (spacing * (rows-1)). What do you think?

Maragues commented 8 years ago

It's been 5 months since the latest commit to the library, I'm afraid it's no longer maintained and we have to use our own forks.

I haven't checked the source of my PR but what you say makes sense, thanks for the catch!