CalendarView height
Closed this issue · 1 comments
In my fragment, I have the calendarView at the top, and a listView of evens below the calendar.
This is the code of the fragment that contains de calendar:
<com.tyczj.extendedcalendarview.ExtendedCalendarView
android:id="@+id/calendar"
android:layout_height="330dp"
android:background="@color/actionbarcolor"
android:layout_width="match_parent"/>
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:dividerHeight="1dp"
android:layout_marginRight="7dp"
android:layout_marginLeft="7dp"
/>
(I have put the green color to see how space the calendar uses).
If I put the height to "wrap_content", the calendar uses all the screen, for that reason, I have put the heigh to 330dp, but I don't like this, because some months ocupies more space than others...
I have the previous, next, and day of the week text with GONE visibility. I use gestures to change the month.
1- How can I do something like wrap_content for the calendar heigh?
2- How can I align calendar to the top? It seems that there's a top margin.
Thanks in advance.
due to some months needing more rows than others there is no way to do what you want. The calendar is however just a GridView which is scrollable so you can always just scroll up if you set a hard height