Height doesn't adjust for each month with wrap_content on horizontal paged calendar
See original GitHub issueSteps to reproduce
- I’ve added calendar view with wrap_content
<com.kizitonwose.calendarview.CalendarView
android:id="@+id/cv_custom_calendar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:cv_dayViewResource="@layout/calendar_day"
app:cv_hasBoundaries="true"
app:cv_outDateStyle="none"
app:cv_monthHeaderResource="@layout/calendar_header"
app:cv_orientation="horizontal"
app:cv_scrollMode="paged"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_month_year" />
- Open fragment for the first time, scroll to the previous month and height of the CalendarView stays the same even though the number of days and rows increased
- Open the same fragment again, resize works.
Note: Is this an edge case because February starts on Monday with 28 days and it has 4 rows? With fixed android:layout_height it shows all dates, but doesn’t look nice with extra space at the bottom. Also, I can’t find the right height that will show all days for every screen size.
Is there a possibility to have fixed size and spacing between rows to be auto-adjusted?
Device: Samsung S8, Samsung A5 2017
Video: https://vimeo.com/user133404315/review/511093300/5daa85a221
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Height doesn't adjust for each month with wrap_content on ...
Ok, that's not possible. The calendar adjusts its height from the bottom when a month has fewer rows than the previous one. The...
Read more >Changing the height of ConstraintLayout from wrap-content to ...
When I manually enter a height e.g. '30dp' as a View's height, it works, but wrap-content for a Views's height does not work....
Read more >TextView - Android Developers
By setting it to "false" the view will not take focus. This value does not impact the behavior of directly calling android.view.View#requestFocus, which ......
Read more >Using DialogFragment | CodePath Android Cliffnotes
Overview. DialogFragment is a specialized Fragment used when you want to display an overlay modal window within an activity that floats on top...
Read more >Wrap text and change row height in a Project view in Project ...
A quick way to wrap text that isn't wrapped or completely visible in a cell is to increase the row height to enlarge...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, please check with version 1.0.2 which was released yesterday, this issue is likely fixed.
@kizitonwose You solved the first problem with the library, the second one with disappearing dates was on my side in binding logic, it’s fixed now.
Thanks for your help!