Skip to content

Changelog

Version 1.4.0

1.4.0-alpha06

2024-09-05

New features

  • Added setItemSpacing, setItemEdgeSpacing and other spacing setters to DpadRecyclerView (#263) Documentation available here.

  • Added independent min and max edge spacings to DpadLinearSpacingDecoration and DpadGridSpacingDecoration (#263)

API changes

  • Now DpadDragHelper exposes fromUser in onDragStopped, which allows distinguishing between user or programmatic stop requests (#264)

1.4.0-alpha05

2024-08-30

Note: This version includes an update to androidx.recyclerview 1.4.0-beta01, which requires compile SDK set to 35

New features

  • Added OnFocusLostListener to observe focus losses of DpadRecyclerView (#258)
  • Added dpadRecyclerView.setAlignmentLookup to customize the alignment for individual positions (#259)

Compose

  • Improved Modifier.dpadClickable to support long clicks (#261)
  • Fix Modifier.dpadClickable sending FOCUS_ENTER after the click (#261)

Testing

  • Added KeyEvents.longClick to trigger long clicks from tests (#261)

Bug fixes

  • Fix item decorations not being updated whenever the adapter contents change (#260)

1.4.0-alpha04

2024-08-21

Bug fixes

  • Fix header alignment when DpadScrollableLayout triggers a new layout (#255)

1.4.0-alpha03

2024-08-14

Bug fixes

  • Fix header not being initially shown sometimes with DpadScrollableLayout (#253)

1.4.0-alpha02

2024-08-14

Bug fixes

  • Fix issue with header alignment when DpadScrollableLayout receives a layout request during scroll (#251)

1.4.0-alpha01

2024-08-12

New features

  • DpadScrollableLayout for screens that need a scrollable header at the same level as a DpadRecyclerView (#248)

Bug fixes

  • Fixed crash when the layout manager name is set via XML (#247)

Version 1.3.0

1.3.0

2024-08-08

Important changes since 1.2.0

  • Added DpadComposeFocusViewHolder that allows sending the focus state down to Composables
  • Added Modifier.dpadClickable for playing the click sound after clicking on a Composable.
  • Allow skipping layout requests during scroll with setLayoutWhileScrollingEnabled(false)
  • New addOnViewFocusedListener to observe focus changes independently from selection changes.
  • Added DpadDragHelper for drag and drop support. Documentation available here.
  • Now recyclerView.setFocusableDirection(FocusableDirection.CIRCULAR) can also be used in linear layouts that don't fill the entire space.
  • Added DpadStateRegistry that assists in saving and restoring the scroll state or view state of ViewHolders

1.3.0-rc03

2024-07-23

Bug fixes

  • Fixed layout inconsistency after some predictive animations (#240)
  • Fixed rare crash when removing an item due to adapter changes while a scroll action is pending (#240)

1.3.0-rc02

2024-07-11

Bug fixes

  • Fixed DpadRecyclerView not immediately stopping the search for the pivot in some scenarios (#238)

1.3.0-rc01

2024-07-08

  • Reverted default of setLayoutWhileScrollingEnabled() back to true.

1.3.0-beta02

2024-06-20

Bug fixes

  • Fixed OnViewFocusedListener not working correctly for a parent RecyclerView when a nested RecyclerView doesn't have a listener registered (#229)
  • Fixed DpadRecyclerView losing focus when adapter is cleared (#232)

1.3.0-beta01

2024-06-17

Dependency updates

  • Updated library to Kotlin 2.0
  • Updated Compose ui libraries to 1.7.0-beta03

New Features

  • Added DpadDragHelper for drag and drop support (#216). Documentation available here.
  • Now recyclerView.setFocusableDirection(FocusableDirection.CIRCULAR) can also be used in linear layouts that don't fill the entire space. (#225

Improvements

  • Now focusOutFront and focusOutBack are enabled by default due to feedback from library users (#223)
  • Improved focus behavior for grids with uneven spans that have incomplete rows (#224)

1.3.0-alpha04

2024-06-04

New Features

  • Added DpadSelectionSnapHelper to improve selection on touch events. (#215)
  • Added isFocusable to DpadComposeFocusViewHolder to allow disabling focus for some items.

Bug fixes

  • Fixed initial selection being always at position 0, even when that view is not focusable.
  • Fixed some rows not receiving focus in grids using DpadSpanSizeLookup. (#217)
  • Fixed fast scrolling not working correctly in some grids using DpadSpanSizeLookup. (#218)

1.3.0-alpha03

2024-05-31

New Features

  • Added DpadStateRegistry that assists in saving and restoring the scroll state or view state of ViewHolders (#45)

Improvements

  • Disable layout passes during scroll events by default. This is an attempt to fix (#207) To fallback to the previous behavior, please use setLayoutWhileScrollingEnabled(true)

Bug fixes

  • Fixed issue with grid layouts with different spans after item removals. (#210)
  • Fixed DpadRecyclerView losing focus in some cases when adapter contents are updated during scroll events. (#206)

1.3.0-alpha02

2024-03-23

Bug fixes

  • Fixed grids not aligning to the keyline for the last row in some cases. (#203)

1.3.0-alpha01

2024-03-17

New Features

  • Added DpadComposeFocusViewHolder that allows sending the focus state down to Composables (#193)
  • Added Modifier.dpadClickable for playing the click sound after clicking on a Composable. Fix for: (/b/268268856)
  • Allow skipping layout requests during scroll with setLayoutWhileScrollingEnabled(false) (#196)
  • New addOnViewFocusedListener to observe focus changes independently from selection changes. (#197)

API Changes

  • DpadAbstractComposeViewHolder is now removed. Replace it with either DpadComposeFocusViewHolder or DpadComposeViewHolder.

Version 1.2.0

1.2.0

2024-03-13

  • No changes since 1.2.0-rc01

Important changes since 1.1.0

  • Added new RecyclerViewCompositionStrategy.DisposeOnRecycled for compose interop to re-use compositions when views are detached and attached from the window again.
  • Added new setSelectedSubPosition that allows passing a callback for the target alignment (#43)
  • Added support for scrollbars
  • Added DpadScroller for scrolling without any alignment. Typical use case is for long text displays (terms & conditions and consent pages).

1.2.0-rc01

2024-02-03

Bug fixes

  • Fixed focus being sent to the wrong item when scrolling with touch events before pressing a key (#188)

1.2.0-beta02

2024-01-28

New Features

  • Added new RecyclerViewCompositionStrategy.DisposeOnRecycled for compose interop to re-use compositions when views are detached and attached from the window again.

Bug fixes

  • Fixed views not being laid out correctly sometimes when setRecycleChildrenOnDetach is used.

1.2.0-beta01

2024-01-17

New Features

  • Added new setSelectedSubPosition that allows passing a callback for the target alignment (#43)

Bug fixes

  • Fixed navigation sound not being played when searching for pivot (#167)
  • Fixed sub selection not being dispatched when used multiple times in a row

1.2.0-alpha03

2024-01-10

Bug fixes

  • Fixed crash when requesting layout after a selection to an index out of bounds (#178)

1.2.0-alpha02

2023-12-27

Bug fixes

  • Fixed layout jumping to the top when the user scrolls with touch events (#171)
  • Fixed alignment configuration not being respected for small lists (#172)

1.2.0-alpha01

2023-11-25

New Features

  • Added support for scrollbars
  • Added DpadScroller for scrolling without any alignment. Typical use case is for long text displays (terms & conditions and consent pages).

Version 1.1.0

1.1.0

2023-11-12

  • No changes since 1.1.0-rc01

1.1.0-rc01

2023-10-18

Dependency updates

  • Updated androidx.recyclerview to version 1.3.2 to fix sporadic crashes during animations: (/9e69afd)
  • Updated androidx.collection to stable version 1.3.0

1.1.0-beta02

2023-09-15

Bug fixes

  • Fixed wrong scrolling behavior when the app:spanCount attribute is used for grids (#162)

1.1.0-beta01

2023-09-10

Bug fixes

  • Fixed wrong scrolling behavior when the layout isn't completely filled and Edge.MAX alignment is used: (#160)
  • Fixed XML attribute app:dpadRecyclerViewParentAlignmentPreferKeylineOverEdge not being applied correctly

1.1.0-alpha03

2023-08-04

Bug fixes

  • Fixed grid layout not placing views in the correct spans when scrolling in opposite direction: (#156)

1.1.0-alpha02

2023-06-23

Bug fixes

  • Fixed crash when updating adapter contents too frequently: (#153)

1.1.0-alpha01

2023-06-08

New Features

  • Added support for endless scrolling with looping adapter contents: (#20). Check this for more information.

Version 1.0.0

1.0.0

2023-05-16

New Features

  • Added support for API 19 (#146)
  • Added missing XML attribute for parent alignment app:dpadRecyclerViewParentAlignmentPreferKeylineOverEdge (#145)

Bug fixes

  • Fixed crash when R8 is applied (#122)

1.0.0-rc01

2023-05-07

Dependency updates

  • Removed consumer proguard rules
  • Exposed recyclerview dependency to clients

1.0.0-beta03

2023-05-03

Dependency updates

  • Updated compose-ui to version 1.4.2

New Features

  • Added getSpanSizeLookup() to DpadRecyclerView
  • Added onViewHolderSelectedAndAligned to DpadViewHolder

Compose

  • Added DpadAbstractComposeViewHolder to allow subclasses to get access to focus changes. Check Compose interoperability for more information.

Testing

See the documentation here

  • Added KeyEvents.back() to easily press back key events
  • Added DpadRecyclerViewActions.scrollTo and DpadRecyclerViewActions.scrollToHolder to scroll to specific ViewHolders using KeyEvents.
  • Added DpadViewAssertions for asserting focus states:
    • DpadViewAssertions.hasFocus()
    • DpadViewAssertions.doesNotHaveFocus()
    • DpadViewAssertions.isFocused()
    • DpadViewAssertions.isNotFocused()

1.0.0-beta02

2023-04-18

Dependency updates

  • Updated RecyclerView to stable version 1.3.0

New Features

  • Added support for fading edges. Check this for more information. (#18).

Bug fixes

  • Fixed DpadRecyclerView not measuring itself correctly when wrap_content is used. (#123)
  • Fixed max edge alignment not working correctly when scrolling back. (#124)

1.0.0-beta01

2023-04-02

Bug fixes

  • Fixed crash in grid layout when pivot is updated during pagination. (#114)

1.0.0-alpha05

2023-02-21

New Features

  • New dpadrecyclerview-compose module that contains DpadComposeViewHolder for Compose interoperability. Check Compose interoperability for more information.
  • Allow setting 0 max pending moves with setSmoothScrollMaxPendingMoves(0) to fully prevent unwanted scroll events.

API changes

  • offsetRatio in ParentAlignment, ChildAlignment and SubPositionAlignment was renamed to fraction.

Bug fixes

  • Fixed alignment issue when the first item has decoration (#91)
  • Fixed alignment issue when Edge.MIN is used and there's a small number of adapter items (#93)
  • Fixed focus changing to the incorrect span in a grid (#96)
  • Fixed focus being lost when scrolling a grid and triggering layout passes at the same time (#102)
  • Fixed DpadRecyclerView scrolling automatically to the current selected position when there's a touch event (#104)
  • Fixed pending alignments in opposite direction not being ignored (#106)

Testing

  • New KeyEvents.click() to easily dispatch click events in UI tests

1.0.0-alpha04

2023-02-13

New Features

  • Added DpadLinearSpacingItemDecoration and DpadGridSpacingItemDecoration to easily set spacing between items
  • Added setScrollEnabled to enable or disable scroll events
  • Added setLayoutEnabled to enable or disable the layout of children
  • Added support for reverse layout via setReverseLayout
  • Restored support for basic touch event scrolling without triggering selection or alignment changes
  • Added support for item prefetching for nested RecyclerViews
  • setSmoothScrollMaxPendingAlignments allows limiting the number of scroll changes still not applied
  • setSmoothScrollMaxPendingMoves allows remembering DPAD events not yet applied
  • Improved fast smooth scrolling in grids with different span sizes
  • Added setOnChildLaidOutListener to observe when each view is laid out
  • setFocusSearchEnabledDuringAnimations allows enabling or disabling focus changes during item animations.

API Changes

  • ViewHolderAlignment was renamed to SubPositionAlignment. Now DpadViewHolder returns these alignments in getSubPositionAlignments.

Bug fixes

  • Fixed DpadRecyclerView not searching for focus if it's currently retaining focus due to a pivot removal. This prevented accumulating pending moves during smooth scrolling.
  • A nested DpadRecyclerView now won't search for focus if its parent RecyclerView is still smooth scrolling (#50)
  • Alignment not being restored correctly for small lists (#71)
  • Unnecessary ItemAnimator animations were running when scrolling during item changes (#47)
  • a11y scroll actions were not triggering scroll events (#66)
  • Circular focus not working correctly for the first row (#37)

Testing

  • DisableIdleTimeoutRule will now wait for idle input after the test is over to avoid dispatching key events to other tests

1.0.0-alpha03

2023-01-26

New Features

  • Added support for findFirstVisibleItemPosition and findLastVisibleItemPosition (#23)
  • Added support for recycling children on detach (#17)

API Changes

  • Replaced DpadLayoutManager with new PivotLayoutManager for proper customization of layout logic (#10), (#16)

1.0.0-alpha02

2022-12-10

API Changes

  • Allow extending from DpadRecyclerView
  • Removed RecyclerView.canScrollHorizontally and RecyclerView.canScrollVertically since they're not used and clients can create them themselves

1.0.0-alpha01

2022-11-06

  • Initial alpha release