Benchmark Stable, ViewPager2 Stable, and next RecyclerView

Kirill Rozov
2 min readNov 25, 2019

The last week gave us the first stable releases of new libraries, new major releases of existing libraries.

New libraries

Benchmark 1.0.0

Benchmark is a library that allows you to write a performance benchmark of app code and get results. It handles all device configurations issues, stabilizes performance and etc. to ensure that tests will be accurate and consistent.

Benchmark is the first library from AndroidX that is 100% Kotlin.

ViewPager2 1.0.0

ViewPager2 replaces ViewPager. The new widget is built on top of RecyclerView. Old implementation will not be supported anymore and all features will be added only in ViewPager2.

Improvements from the previous ViewPager are:

  • RTL (right-to-left) layout support
  • Vertical and horizontal orientations support
  • Reliable Fragment support (including handling changes to the underlying Fragment collection)
  • Dataset change animations (including DiffUtil support)
  • Many possibilities of RecyclerView are available

Migration guide from old ViewPager to ViewPager2 and the sample app.

New stable major versions

RecyclerView 1.1.0

Changes since 1.0.0:

  • Possibility to set smooth scroll animation duration with RecyclerView.smoothScrollBy(dx: Int, dy: Int, interpolator: Interpolator?, duration: Int)
  • RecyclerView.setLayoutTransition(LayoutTransition) is deprecated (formally). Use RecyclerView.setItemAnimator(ItemAnimator) instead
  • Default style attribute recyclerViewStyle, which allow setting default style in a theme
  • RecyclerView no implements NestedScrollingChild3, enabling it to be informed of when all its nested scrolling parents have stopped consuming nested scrolling distances
  • PagerSnapHelper and LinearSnapHelper now take padding of RecyclerView into account regardless of the value of clipToPadding
  • LinearLayoutManager.calculateExtraLayoutSpace(RecyclerView.State, IntArray) can be overridden to customize how much extra layout space should be added to either side of the associated RecyclerView. That allows you to render more items located outside the visible area
  • ViewCompat accessibility actions API no longer breaks RecyclerView.ItemDelegate

Exifinterface 1.1.0

Changes since 1.0.0:

Minor releases

Room 2.2.2

  • Fixed a bug where collecting a one-to-one relationship with more than 999 rows would cause Room to return null relating items

New beta and RCs:

If you know Russian and want to know more about Android development you can subscribe to Android Broadcast Telegram Channel

--

--