Skip to content

fix: display months in year view in horizontal mode in a scrollview#1057

Open
rros wants to merge 1 commit intoFossifyOrg:mainfrom
rros:feature/scollable-horizontal-year-view
Open

fix: display months in year view in horizontal mode in a scrollview#1057
rros wants to merge 1 commit intoFossifyOrg:mainfrom
rros:feature/scollable-horizontal-year-view

Conversation

@rros
Copy link
Contributor

@rros rros commented Feb 14, 2026

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

I changed the layout of the fragment_year layout to have a scrollview for the months. Because the SmallMonthView doesn't have a size of itself, I added an onMeasure method to calculate the desired size of the view. This combined with choosing a good combination of wrap_content and match_parent fixes the layout of this view in horizontal mode.
Some additional considerations:

  • I checked this on a phone. Tablets might be more square in dimensions, so a different grid might be better. Then we might need to calculate the number of rows and columns based on dimensions: 2x6, 3x4, 4x3 or 6x2 for instance.
  • When the pull-to-refresh function is enabled, it interferes with the scrollview. To fix this, we need to change the implementation from a ScrollView to RecyclerView with a GridLayoutManager.

Tests performed

  • Tested on an emulator

Before & after preview

Before:
afbeelding

After:
Screen_recording_20260214_233544.webm

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

@rros rros requested a review from naveensingh as a code owner February 14, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Year view not all days in month are shown

1 participant